Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Building sage from source builds a specific Jupyter installation, living somewhere under `$SAGE_ROOT. Compare :

charpent@zen-book-flip:~$ sage -sh -c "which jupyter"
/usr/local/sage-10/local/var/lib/sage/venv-python3.11/bin/jupyter

i. e. Sage's Jupyter, with :

charpent@zen-book-flip:~$ which jupyter
/usr/bin/jupyter

i. e. system's Jupyter. This results from an old "Sage comes with batteries included" policy that turned Sage in some mini-distribution (hence the nickname "Sage-the-distribution") you see on sage-devel...). This eased the adaptation oof various math software and system as Sage's components. But entailed a lot of work and a tendency to drift a^part from their upstream sources.

In particular, when you run sage -n jupyter, what os run is indeed Sage's Jupyter.

This policy is now counterbalanced by a serious modularization effort : more and more Sage components can use their system's counterpart. This can be done for Jupyter (although it is not yet the default). You can instal Sage's kernel in the system's Jupyter ; see this part of Sage's documentation.

Or you could also install Sage's Jupyter as your default one, and install other kernels in this installation. Choose our poison...

HTH,

Building sage from source builds a specific Jupyter installation, living somewhere under `$SAGE_ROOT. Compare :

charpent@zen-book-flip:~$ sage -sh -c "which jupyter"
/usr/local/sage-10/local/var/lib/sage/venv-python3.11/bin/jupyter

i. e. Sage's Jupyter, with :

charpent@zen-book-flip:~$ which jupyter
/usr/bin/jupyter

i. e. system's Jupyter. This results from an old "Sage comes with batteries included" policy that turned Sage in some mini-distribution (hence the nickname "Sage-the-distribution") you see on sage-devel...). This eased the adaptation oof various math software and system as Sage's components. But entailed a lot of work and a tendency to drift a^part from their upstream sources.

In particular, when you run sage -n jupyter, what os is run is indeed Sage's Jupyter.

This policy is now counterbalanced by a serious modularization effort : more and more Sage components can use their system's counterpart. This can be done for Jupyter (although it is not yet the default). You can instal Sage's kernel in the system's Jupyter ; see this part of Sage's documentation.

Or you could also install Sage's Jupyter as your default one, and install other kernels in this installation. Choose our poison...

HTH,

Building sage from source builds a specific Jupyter installation, living somewhere under `$SAGE_ROOT. Compare :

charpent@zen-book-flip:~$ sage -sh -c "which jupyter"
/usr/local/sage-10/local/var/lib/sage/venv-python3.11/bin/jupyter

i. e. Sage's Jupyter, with :

charpent@zen-book-flip:~$ which jupyter
/usr/bin/jupyter

i. e. system's Jupyter. In particular, when you run sage -n jupyter, what is run is indeed Sage's Jupyter.

This results from an old "Sage comes with batteries included" policy that turned Sage in some mini-distribution (hence the nickname "Sage-the-distribution") you see on sage-devel...). This eased the adaptation oof various math software and system as Sage's components. But entailed a lot of work and a tendency to tof Sage's versions o drift a^part apart from their upstream sources.

In particular, when you run sage -n jupyter, what is run is indeed Sage's Jupyter.origins.

This policy is now counterbalanced by a serious modularization effort : more and more Sage components can use their system's counterpart. This can be done for Jupyter (although it is not yet the default). You can instal Sage's kernel in the system's Jupyter ; see this part of Sage's documentation.

Or you could also install Sage's Jupyter as your default one, and install other kernels in this installation. Choose our poison...

HTH,

Building sage from source builds a specific Jupyter installation, living somewhere under `$SAGE_ROOT. Compare :

charpent@zen-book-flip:~$ sage -sh -c "which jupyter"
/usr/local/sage-10/local/var/lib/sage/venv-python3.11/bin/jupyter

i. e. Sage's Jupyter, with :

charpent@zen-book-flip:~$ which jupyter
/usr/bin/jupyter

i. e. system's Jupyter. In particular, when you run sage -n jupyter, what is run is indeed Sage's Jupyter.

This results from an old "Sage comes with batteries included" policy that turned Sage in some mini-distribution (hence the nickname "Sage-the-distribution") you see on sage-devel...). This eased the adaptation oof various math software and system as Sage's components. But entailed a lot of work and a tendency tof Sage's versions o drift apart from their upstream origins.

This policy is now counterbalanced by a serious modularization effort : more and more Sage components can use their system's counterpart. This can be done for Jupyter (although it is not yet the default). You can instal Sage's kernel in the system's Jupyter ; see this part of Sage's documentation.

Or you could also install Sage's Jupyter as your default one, and install other kernels in this installation. Choose our your poison...

In Debian's case, keeping Sage's Jupyter may be ise : Debian recently choose a "managed setup" which forbids you to sudo pip instal <whatever to install Python packages systemwide,and requires you to apt install python3-<whatever> systemwide. You can still install a not-yet-Debian-packaged extension with pipx install <whatever> on a user-per-user basis.

Nototious case : the Jupyter Lab notebook :

charpent@zen-book-flip:~$ pip install jupyterlab
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.


If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages

The venv solution directly competes with Sage (that's roughly what sage -sh does...). Keeping Sage's Jupyter may save you a couple of headaches...

HTH,