SageMath Jupyter kernel not listed after installing Sage from source
I will list a bunch of potentially relevant info:
I am running Ubuntu 2204.2.33.0 on WSL
I had installed sage initially using the apt as
sudo apt install sagemath
I had managed to run Jupyter NB with three different kernels: Rstats (IR), python, sagemath
I decided to install SageMath from source, starting with removing the installed version with
sudo apt-get --purge remove sagemath
I have now SageMath version 10.0 installed. However its kernel does not appear as an option for Jupyter NB.
If I run the command
jupyter kernelspec list
I get back:
└─$jupyter kernelspec list Available kernels: ir
/home/toni/.local/share/jupyter/kernels/ir python3
/home/toni/.local/share/jupyter/kernels/python3
I have tried creating a directory inside /home/toni/.local/share/jupyter/kernels
called sagemath
and running sudo jupyter kernelspec install ./SageMath/local/share/jupyter/kernels/sagemath
, which doesn't seem to make sense how it would work, but it was a suggestion on a this answer, and I am probably applying it incorrectly. That gave me the error message: Jupyter command jupyter-kernelspec not found.
I have SageMath under a different directory: /home/toni/sage
, and I don't see Jupyter inside the subdirectory /home/toni/sage/local/share
I THOUGHT I HAD SOLVED THIS, BUT NO...
With the solution I posted, i.e.
I got it going by simply running:
sudo apt install sagemath-jupyter
Now:
└─$jupyter kernelspec list
Available kernels:
ir /home/toni/.local/share/jupyter/kernels/ir
python3 /home/toni/.local/share/jupyter/kernels/python3
sagemath /usr/share/jupyter/kernels/sagemath
I did get the kernel for Sage on Jupyter NB. However, I just realized that the kernel if for Sage 9.5, not Sage 10!