Ask Your Question
1

sagemath 9.0 and sagemath 9.3 on my computer crash

asked 2022-05-20 04:29:57 +0200

licheng gravatar image

updated 2022-05-21 08:59:51 +0200

I've been using Sagemath on my computer (windows 10) for a long time, but today I found that sagemath Notebook9.0 or 9.3 all crash. I looked at the following information returned by sagemathshell. It doesn't seem normal. I don't know how to solve it. Even if I reinstalled it, it didn't work.

sagemath 9.2 notebook:

Could not find platform independent libraries <prefix>Could not find platform dependent libraries <exec_prefix>Consider setting $PYTHONHOME to <prefix>[ :<exec_prefix>]

Could not find platform independent libraries <prefix>Could not find platform dependent libraries <exec_prefix>Consider setting $PYTHONHOME to <prefix>[ :<exec_prefix>] Fatal Python error: initfsencoding: Unable to get the locale encodingModuleNotFoundError : No module named 'encodings ' Current thread oxe000000800018040(most recent call first): [main] python3 1975 cygwin_exception: : open_stackdumpfile: Dumping stacktrace to python3.stackdump

[main] python3 1975 cygwin_exception: : open_stackdumpfile: Dumping stacktrace to python3.stackdump

sagemath9.3shell:

*Don't forget to exit when you are done. Beware:

  • Do not do anything with other copies of Sage on your system. * Do not use this for installing Sage packages using "sage -i" or for
    running "make" at Sage's root directory. These should be done
    outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/opt/sagemath-9.3

(sage-sh) asus@LAPTOP-PVHBSM6R:~$*

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-05-20 18:25:16 +0200

ortollj gravatar image

updated 2022-05-23 06:55:01 +0200

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

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
edit flag offensive delete link more

Comments

the only disadvantage of this method is that the make command can take a very long time, for example 6 hours on one of my old PCs and less than 3 hours on my new PC!.

ortollj gravatar imageortollj ( 2022-05-20 18:31:45 +0200 )edit

Thank you for your kind advice. Recent lagging updates to Sagemath for Windows have made me worry about not offering a Windows version of Sagemath in the future.

licheng gravatar imagelicheng ( 2022-05-21 04:15:27 +0200 )edit

where the sage files are located with ubuntu20.04 WSL2 :

C:\Users\jean-pierre\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home\ortollj\.sage

where ubuntu.exe is located (for me Ubuntu2004.exe !):

C:\Users\jean-pierre\AppData\Local\Microsoft\WindowsApps
ortollj gravatar imageortollj ( 2022-05-21 19:06:46 +0200 )edit
ortollj gravatar imageortollj ( 2022-05-23 07:03:23 +0200 )edit

you can speed up the make , I have 16 cores so I use make -j32 and the make only lasted half an hour !. as @slelievre told me in this post

ortollj gravatar imageortollj ( 2022-12-10 13:32:29 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2022-05-20 04:29:57 +0200

Seen: 350 times

Last updated: May 23 '22