Is there a way to install the sage kernel in a (system-wide, possibly remote) Jupyter ?

1,037 views
Skip to first unread message

Emmanuel Charpentier

unread,
Oct 22, 2015, 9:02:17 AM10/22/15
to sage-support
Dear List,

I have some prblems running the Jupyter notebook as installed by sage (see other posts).

Furthermore, I'd like to try some interesting kernels (such as Robert Dodier's recent Maxima kernel), which depend on a Python3-Jupyter installation.

Is there a way to install the Sage kernel (with its extensions such as preparser, graphics, etc...) in a Jupyter/Python3 installation ?

--
Emmanuel Charpentier

Jeroen Demeyer

unread,
Oct 22, 2015, 12:34:29 PM10/22/15
to sage-s...@googlegroups.com
On 2015-10-22 15:02, Emmanuel Charpentier wrote:
> Is there a way to install the Sage kernel (with its extensions such as
> preparser, graphics, etc...) in a Jupyter/Python3 installation ?
Sure, just copy the directories $SAGE_LOCAL/share/jupyter and
$SAGE_LOCAL/etc/jupyter to your favourite Jupyter installation.

William Stein

unread,
Oct 22, 2015, 12:41:48 PM10/22/15
to sage-support
To make things system-wide you put them in /usr/local/share/jupyter.
For example, here's info about the current /usr/local/share/jupyter on
SageMathCloud:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/

>
>
> --
> 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 post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.



--
William (http://wstein.org)

Emmanuel Charpentier

unread,
Oct 23, 2015, 4:50:00 AM10/23/15
to sage-support
Thanks ! Symlinking  $SAGE_LOCAL/share/jupyter/sagemath/jupyter/kernels/sagemath and  $SAGE_LOCAL/share/jupyter/nbextensions/* in the relevant systemwide directory (/usr/local/share/jupyter on a Debian installation) worked as expected. Note that I did *not* use $SAGE_LOCAL/etc, since I didn't knew what to do with it...

HTH,

--
Emmanuel Charpentier

Jeroen Demeyer

unread,
Oct 23, 2015, 7:51:21 AM10/23/15
to sage-s...@googlegroups.com
On 2015-10-23 10:50, Emmanuel Charpentier wrote:
> Thanks ! Symlinking
> $SAGE_LOCAL/share/jupyter/sagemath/jupyter/kernels/sagemath and
> $SAGE_LOCAL/share/jupyter/nbextensions/* in the relevant systemwide
> directory (/usr/local/share/jupyter on a Debian installation) worked as
> expected. Note that I did **not** use $SAGE_LOCAL/etc, since I didn't
> knew what to do with it...

I think mathjax in Sage will break if you don't use the configuration
file in $SAGE_LOCAL/etc.

What you should do with "etc" is exactly the same as what you did with
"share": symlink or copy the needed files and directories.

Jeroen.

Stephan Sahm

unread,
Feb 19, 2016, 9:45:30 AM2/19/16
to sage-support
Dear all,

I just started to use sage and now set up a system wide jupyter kernel as suggested in this thread.
I do not need to symlink `$SAGE_LOCAL/etc/jupyter but mathjax` works out of the box

However, jmol does not work, neither in the notebook, nor in the qtconsole.
(but viewer='tachyon' works) (If I start everything with `sage --notebook='jupyter'` then jmol works normal)

Anyone any idea what might be missing to get 3d rendering system-wide?

best,
Stephan

HG

unread,
Feb 19, 2016, 10:43:24 AM2/19/16
to sage-support
Would you be so kind to explain me (or us) how you can make maxima running in notebook, I didnt understand how to configure recent maxima kernel.

Volker Braun

unread,
Feb 19, 2016, 11:48:29 AM2/19/16
to sage-support
You need to link/copy the jsmol directory to the jupyter nbextensions folder. In Sage thats at SAGE_LOCAL/share/jupyter/nbextensions/jsmol

ebra...@gmail.com

unread,
Jul 18, 2017, 6:00:09 PM7/18/17
to sage-support
On a macOS box, I appended this to my .zshrc, don't know if is a good way to do so:

export SAGE_ROOT="/Applications/SageMath-7.6.app/Contents/Resources/sage"
export JUPYTER_CONFIG_DIR="$SAGE_ROOT/local/etc/jupyter"
export JUPYTER_PATH="$SAGE_ROOT/local/share/jupyter"
Reply all
Reply to author
Forward
0 new messages