I downloaded SageMath-9.2
on my mac, but every time I try to use the notebook
by running "sage -n jupyter
" on my terminal
I get the following massage:
Please wait while the Sage Jupyter Notebook server starts...
Traceback (most recent call last):
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/repl/ipython_kernel/install.py", line 307, in have_prerequisites
from notebook.notebookapp import NotebookApp
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/notebook/notebookapp.py", line 66, in
from tornado import httpserver
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/tornado/httpserver.py", line 29, in
import ssl
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/ssl.py", line 98, in
import _ssl # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
The Jupyter notebook requires ssl, even if you do not use https. Install the openssl development packages in your system and then rebuild Python (sage -f python3).
And also I can't open the app either for some reason ..... every time I click on the app I get a small window saying :
Jupyter Server failed to start
For some reason the Jupyter server failed to start. Please check the log for clues, and have that information handy when asking for help.
I hope for some help, its very important for me because I must use SageMath for my college project.. thanks in advance
On macOS Big Sur, there are several ways to install SageMath
Sage can also be used online using
The installation you currently have was downloaded as a macOS app, which ships its own Python which lacks the SSL module (for licence reasons).
To repair it:
brew install
recommendations at the end of configure$ DIR=/Applications/SageMath-9.2.app/Contents/Resources/sage
$ cd $DIR
$ git checkout develop
$ git pull origin develop --tags
$ MAKE='make -j8'
$ V=0
$ source .homebrew-build-env
$ make -s V=0 python3-clean
$ make -s V=0 configure
$ ./configure
$ make -s V=0
The other way to solve your problem is to use the SageMath Jupyter kernel provided by Sage with your system-wide Jupyter (eg as installed via Homebrew).
This should achieve that goal:
$ SAGE_LOCAL=`sage -c 'print(SAGE_LOCAL)'`
$ SAGE_KERNEL=$SAGE_LOCAL/share/jupyter/kernels/sagemath
$ KERNELS=$HOME/Library/Jupyter/kernels
$ ln -s $SAGE_KERNEL $KERNELS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With