Sage Kernel for Jupyter Notebooks

46 views
Skip to first unread message

Luis Finotti

unread,
Mar 1, 2026, 11:31:17 AMMar 1
to sage-support

But in my install of 10.8, the kenel does not seem to be available, at least in the "usual" location:

$ ls ~/src/sage-10.8/venv/share/jupyter/kernels/
python3/

Did it change locations?

Dima Pasechnik

unread,
Mar 1, 2026, 12:12:16 PMMar 1
to sage-s...@googlegroups.com
It's likely in ~/.local/share/jupyter/kernels/sagemath/

 

--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-support/aae96c13-2b8e-4fa0-a2d3-0ff798c54ebdn%40googlegroups.com.

Luis Finotti

unread,
Mar 1, 2026, 6:54:51 PMMar 1
to sage-support
Here is what I have (including links I've manually created for previous versions):

$ ls ~/.local/share/jupyter/kernels/
julia-1.8/  python3/    sage-10.1@  sage-10.3@  sage-10.5@
magma/      sage-10.0@  sage-10.2@  sage-10.4@  sagemath/

Indeed, the sagemath folder contains the new 10-8 kernel.  What will happen when a new version of sage is installed?  Will it be overwritten?  I usually keep a couple of old versions for safety.  (It seems strange to write directly to an external folder.)

Also, although I can start Jupyter Lab from sage (with "sage -n jupyterlab"), when I try to use Sage from an environment containing JupyterLab, it fails to properly load the kernel:

I 2026-03-01 18:52:01.494 ServerApp] Kernel started: 2fb74636-90a0-435b-b5b5-a2e591f9f55b
/home/finotti/.venvs/DS/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
[I 2026-03-01 18:52:04.478 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
/home/finotti/.venvs/DS/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
[I 2026-03-01 18:52:07.492 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (2/5), new random ports
/home/finotti/.venvs/DS/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
[I 2026-03-01 18:52:10.507 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (3/5), new random ports
/home/finotti/.venvs/DS/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
[I 2026-03-01 18:52:13.521 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (4/5), new random ports
/home/finotti/.venvs/DS/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
[I 2026-03-01 18:52:16.535 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (5/5), new random ports
/home/finotti/.venvs/DS/bin/python3: Error while finding module specification for 'sage.repl.ipython_kernel' (ModuleNotFoundError: No module named 'sage')
[W 2026-03-01 18:52:19.548 ServerApp] AsyncIOLoopKernelRestarter: restart failed
[W 2026-03-01 18:52:19.549 ServerApp] Kernel 2fb74636-90a0-435b-b5b5-a2e591f9f55b died, removing from map.

(And ipython is installed in the environment: ipython==9.10.0, ipykernel==7.2.0) 

Dima Pasechnik

unread,
Mar 1, 2026, 9:19:35 PMMar 1
to sage-s...@googlegroups.com
The right way to deal with this is to let the users of an external jupyter(lab) run the command to install the Sage kernel, and do not run this command for them, because there are just too many ways this could be set up.


We should implement/document this property.
Reply all
Reply to author
Forward
0 new messages