[sage-support] Re: sage-10.0 not working in Jupyter Lab
Firstly, thank you very much for your help, Nils! I greatly appreciate it! On Monday, May 29, 2023 at 8:06:46 PM UTC-4 Nils Bruin wrote: On Monday, 29 May 2023 at 10:51:27 UTC-7 Luis Finotti wrote: Any ideas on how to fix it? Is it just me, or a bug with version 10.0? I followed the same steps I've always followed: https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation I guess, to rule out that it's not something weird with jupyterlab, you'd want to try "jupyter notebook" as well and see if the kernel misbehaves then as well (but it would be really weird if it didn't because lab and notebook will be starting their kernels in exactly the same way) The jupyter notebook had the same problem... the problem is this symbol: _ZNK6Givaro7IntegercvNSt7__cxx1112basic_stringIcSt11char so perhaps if the problem is sage 10.0-specific: did Givaro get upgraded in 10.0? Perhaps you're picking up a different/old Givaro when starting the kernel whereas starting sage "properly" manages to find a givaro built by/for sage 10.0? I am not sure. I will try to find out. You can check: $HOME/.local/share/jupyter/kernels/sagemath/kernel.json what command is used to start sage. You could check if that command (bare) works and if it works if you execute " --python" and then "from sage.all import *" That worked fine, no errors and a few commands worked as expected. It could be that the sage script itself got changed and somehow doesn't set the environment as it needs to be to resolve the givaro library properly. I'm sorry, I don't really have a ready-made solution for you. Hopefully this helps in finding what's wrong and/or may jog someone else into responding. Again, I really appreciate you taking the time to help! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/3adc3135-e4ab-4fa1-ab26-a8d6417155d9n%40googlegroups.com.
[sage-support] Re: sage-10.0 not working in Jupyter Lab
On Monday, 29 May 2023 at 10:51:27 UTC-7 Luis Finotti wrote: Any ideas on how to fix it? Is it just me, or a bug with version 10.0? I followed the same steps I've always followed: https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation I guess, to rule out that it's not something weird with jupyterlab, you'd want to try "jupyter notebook" as well and see if the kernel misbehaves then as well (but it would be really weird if it didn't because lab and notebook will be starting their kernels in exactly the same way) the problem is this symbol: _ZNK6Givaro7IntegercvNSt7__cxx1112basic_stringIcSt11char so perhaps if the problem is sage 10.0-specific: did Givaro get upgraded in 10.0? Perhaps you're picking up a different/old Givaro when starting the kernel whereas starting sage "properly" manages to find a givaro built by/for sage 10.0? You can check: $HOME/.local/share/jupyter/kernels/sagemath/kernel.json what command is used to start sage. You could check if that command (bare) works and if it works if you execute " --python" and then "from sage.all import *" It could be that the sage script itself got changed and somehow doesn't set the environment as it needs to be to resolve the givaro library properly. I'm sorry, I don't really have a ready-made solution for you. Hopefully this helps in finding what's wrong and/or may jog someone else into responding. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/046e9888-80e6-4aec-bbd0-3960f3202673n%40googlegroups.com.
[sage-support] Re: sage-10.0 not working in Jupyter Lab
On Monday, May 29, 2023 at 1:11:03 PM UTC-4 Nils Bruin wrote: That looks like a linking error. Probably it's picking up a library from a different sage install. Did you check that sage-10.0 runs fine by itself? Did you check that sage-10.0 runs fine with its "own" notebook, using "sage --notebook"? The answer is yes to both questions. If those do work then I expect that the kernel you point jupyterlab to ends up starting sage with at least part of the environment correct for sage-10.0 (the file you get the error in does lie in sage-10.0) but probably not quite with the right venv set up. Any ideas on how to fix it? Is it just me, or a bug with version 10.0? I followed the same steps I've always followed: https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation I have the same problem in three different installations (from source), all in Debian Sid. If I remember well, one of them has only Sage 10.0 installed. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/894d694d-a4d8-449a-adf6-757b7ab6f29an%40googlegroups.com.
[sage-support] Re: sage-10.0 not working in Jupyter Lab
On Monday, 29 May 2023 at 07:39:33 UTC-7 Luis Finotti wrote: ImportError: /home/finotti/src/sage-10.0/src/sage/matrix/ matrix_modn_dense_float.cpython-311-x86_64-linux-gnu.so: undefined symbol: _ZNK6Givaro7IntegercvNSt7__cxx1112basic_stringIcSt11char _traitsIcESaIcEEEB5cxx11Ev Any ideas on what is wrong? That looks like a linking error. Probably it's picking up a library from a different sage install. Did you check that sage-10.0 runs fine by itself? Did you check that sage-10.0 runs fine with its "own" notebook, using "sage --notebook"? If those do work then I expect that the kernel you point jupyterlab to ends up starting sage with at least part of the environment correct for sage-10.0 (the file you get the error in does lie in sage-10.0) but probably not quite with the right venv set up. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/7c35c276-b499-4e7a-8243-533dfe164cdan%40googlegroups.com.
[sage-support] sage-10.0 not working in Jupyter Lab
I have just installed version 10.0 from source (in Debian Sid). Everything seems to work fine, but the usual method to add Sage to Jupyter Lab does not work. I created a symlink as usual: $ ll /home/finotti/.local/share/jupyter/kernels Permissions Size UserGroup Date Modified Name drwxr-xr-x - finotti finotti 28 Mar 13:20 magma/ drwxr-xr-x - finotti finotti 28 Mar 11:38 python3/ lrwxrwxrwx62 finotti finotti 28 Mar 13:19 sage -> /home/finotti/src/sage-9.8/venv/share/jupyter/kernels/sagemath/ lrwxrwxrwx63 finotti finotti 29 May 10:31 sage-10.0 -> /home/finotti/src/sage-10.0/venv/share/jupyter/kernels/sagemath/ Sage 9.8 works as expected, but 10.0's kernel does not work. Here are some of the error messages: [I 2023-05-29 10:39:03.537 ServerApp] Kernel started: b57d96c5-8f23-4b05-abbd-abd4aa480f5b Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/finotti/src/sage-10.0/src/sage/repl/ipython_kernel/__main__.py", line 3, in IPKernelApp.launch_instance(kernel_class=SageKernel) File "/home/finotti/src/sage-10.0/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/traitlets/config/application.py", line 981, in launch_instance app.initialize(argv) File "/home/finotti/src/sage-10.0/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/traitlets/config/application.py", line 110, in inner return method(app, *args, **kwargs) File "/home/finotti/src/sage-10.0/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 647, in initialize self.init_kernel() File "/home/finotti/src/sage-10.0/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 499, in init_kernel kernel = kernel_factory(parent=self, session=self.session, ^ File "/home/finotti/src/sage-10.0/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/traitlets/config/configurable.py", line 551, in instance inst = cls(*args, **kwargs) File "/home/finotti/src/sage-10.0/src/sage/repl/ipython_kernel/kernel.py", line 52, in __init__ SageJupyterCustomizations(self.shell) File "/home/finotti/src/sage-10.0/src/sage/repl/ipython_extension.py", line 445, in __init__ self.init_environment() File "/home/finotti/src/sage-10.0/src/sage/repl/ipython_extension.py", line 478, in init_environment initialize_globals(self.all_globals(), self.shell.user_ns) ^^ File "/home/finotti/src/sage-10.0/src/sage/repl/ipython_extension.py", line 581, in all_globals from .ipython_kernel import all_jupyter File "/home/finotti/src/sage-10.0/src/sage/repl/ipython_kernel/all_jupyter.py", line 5, in from sage.all_cmdline import * File "/home/finotti/src/sage-10.0/src/sage/all_cmdline.py", line 17, in from sage.all import * File "/home/finotti/src/sage-10.0/src/sage/all.py", line 91, in from sage.algebras.all import * File "/home/finotti/src/sage-10.0/src/sage/algebras/all.py", line 21, in import sage.algebras.catalog as algebras File "/home/finotti/src/sage-10.0/src/sage/algebras/catalog.py", line 86, in from sage.algebras.quatalg.quaternion_algebra import QuaternionAlgebra as Quaternion File "/home/finotti/src/sage-10.0/src/sage/algebras/quatalg/quaternion_algebra.py", line 73, in from . import quaternion_algebra_cython File "sage/algebras/quatalg/quaternion_algebra_cython.pyx", line 1, in init sage.algebras.quatalg.quaternion_algebra_cython # distutils: language = c++ File "sage/matrix/matrix_integer_dense.pyx", line 1, in init sage.matrix.matrix_integer_dense # -*- coding: utf-8 -*- ImportError: /home/finotti/src/sage-10.0/src/sage/matrix/matrix_modn_dense_float.cpython-311-x86_64-linux-gnu.so: undefined symbol: _ZNK6Givaro7IntegercvNSt7__cxx1112basic_stringIcSt11char _traitsIcESaIcEEEB5cxx11Ev Any ideas on what is wrong? -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/76a6b1ea-318a-4848-a30a-45469bb7bd24n%40googlegroups.com.