Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install sagemath kernel in Jupyter

Tags:

I could use Python Kernel with Jupyter. I am looking for a way to use sagemath inside Jupyter.I couldnt see a way for installing it. How to do that?

like image 577
user567879 Avatar asked Sep 02 '16 15:09

user567879


People also ask

How do you use SageMath kernel in Jupyter Notebook?

json file to make the SageMath Jupyter kernel aware of SageMath's location, by adding "env":{"SAGE_ROOT":"/path/to/sage"} at the end of the dictionary in kernel. json . You will find the location of kernel. json by executing jupyter kernelspec list .

How do I download SageMath?

The traditional and recommended way to install SageMath is from source via Sage-the-distribution (https://www.sagemath.org/download-source.html).


1 Answers

I have just installed SageMath kernel on my existing Jupyter installation. It's super easy.

$ sudo jupyter kernelspec install ./SageMath/local/share/jupyter/kernels/sagemath 

Where SageMath is your root sagemath directory. Hope this will help someone.

If you don't have sudo rights you won't be able to install system-wide, but you can still install for yourself using the --user flag:

$ jupyter kernelspec install --user ./SageMath/local/share/jupyter/kernels/sagemath 
like image 182
Layek Avatar answered Sep 18 '22 06:09

Layek