Ask Your Question

Revision history [back]

In the Ubuntu installed under WSL, installing from Conda should be a lot faster.

First, install Mambaforge:

$ INSTALLER=Mambaforge-$(uname)-$(uname -m).sh

This starts an installation scripts which guides you in installing Mambaforge. Follow the script's instructions, which sometimes involve typing "yes", or hitting Enter, etc. (if in doubt, use the suggested defaults).

Once this is done, the last few lines tell you to open a new terminal.

In that new terminal, if the conda base environment gets auto-activated, and that annoys you, run

$ conda config --set auto_activate_base false

and open yet another terminal to see that taken into account.

In that new terminal, type one of the following:

$ mamba create -n sage sage jupyterlab

Mamba will solve the constraints for installing the requested software, and propose a choice of package versions. Accept it and let it install.

Done installing.

To use your new installation, in any new terminal window, activate the sage conda environment:

$ conda activate sage

then run one of:

$ sage  # to use the Sage REPL
$ jupyter lab  # to use Sage in Jupyter

Happy computing!