Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi @licheng I will give you the advice to rather do the installation of SageMath under W10 with WSL2 Ubuntu 20.04, follow the instructions below. this will allow you to have 2 shortcuts on your W10 desktop one for Jupyter notebook and the other for Jupyter Lab. Sandy Scott site look also here: Additional Information

image description

Hi @licheng I will give you the advice to rather do the installation of SageMath under W10 with WSL2 Ubuntu 20.04, follow the instructions below. this will allow you to have 2 shortcuts on your W10 desktop one for Jupyter notebook and the other for Jupyter Lab. Sandy Scott site look also here: Additional Information

image description

I add a summary of the commands to install SageMath with Jupyter notebook only, it's just a simple extraction of the commands from Sandy Scott's site (without Jupyter Lab) below:

edited 2022/05/23

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ g++ gcc gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblrcalc-dev liblzma-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3 python3-distutils r-base-dev r-cran-lattice singular sqlite3 sympow tachyon tar tox xcas xz-utils xz-utils

cd ~
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.5.tar.gz
tar xvf sage-9.5.tar.gz

cd sage-9.5
./configure

make
nano ~/.bashrc # add this line below at the end of bashrc
alias sage=~/sage-9.5/sage

Close ubuntu then reopen it.

sage_nb.sh contents below:
#!/bin/bash
cd /mnt/c/Documents\ and\ Settings/UserW10
/home/UserLinux/sage-9.5/sage --notebook

chmod ug+x sage_nb.sh

./sage_nb.sh

# where the sage files are located with ubuntu20.04 WSL2 UserW10=Windows Users name,UserLinux = Linux Users name :
#C:\Users\UserW10\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home\UserLinux\.sage
# where ubuntu.exe is located (for me Ubuntu2004.exe not Ubuntu.exe!):
C:\Users\UserW10\AppData\Local\Microsoft\WindowsApps

Hi @licheng I will give you the advice to rather do the installation of SageMath under W10 with WSL2 Ubuntu 20.04, follow the instructions below. this will allow you to have 2 shortcuts on your W10 desktop one for Jupyter notebook and the other for Jupyter Lab. Sandy Scott site look also here: Additional Information

image description

I add a summary of the commands to install SageMath with Jupyter notebook only, it's just a simple extraction of the commands from Sandy Scott's site (without Jupyter Lab) below:

edited 2022/05/23

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ g++ gcc gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblrcalc-dev liblzma-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3 python3-distutils r-base-dev r-cran-lattice singular sqlite3 sympow tachyon tar tox xcas xz-utils xz-utils

cd ~
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.5.tar.gz
tar xvf sage-9.5.tar.gz

cd sage-9.5
./configure

make
nano ~/.bashrc # add this line below at the end of bashrc
alias sage=~/sage-9.5/sage

Close ubuntu then reopen it.

nano ~/sage_nb.sh

sage_nb.sh contents below:
#!/bin/bash
cd /mnt/c/Documents\ and\ Settings/UserW10
/home/UserLinux/sage-9.5/sage --notebook

chmod ug+x sage_nb.sh

./sage_nb.sh

# where the sage files are located with ubuntu20.04 WSL2 UserW10=Windows Users name,UserLinux = Linux Users name :
#C:\Users\UserW10\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home\UserLinux\.sage
this below is needed for the desktop shorcut
# where ubuntu.exe is located (for me Ubuntu2004.exe not Ubuntu.exe!):
C:\Users\UserW10\AppData\Local\Microsoft\WindowsApps