Ask Your Question
1

kernel error in Sagemaths

asked 2022-02-17 00:35:31 +0100

ErWinz gravatar image

updated 2022-03-01 14:30:08 +0100

hello i am going to decide to leave definitively the association jupyter-sagemaths because it has taken me hours and hours without any resolution but in case it is useful for anyone else, i write the description, being as precise as possible

  • the software are : Macos Catalina 10.15.7 SageMath-9-4 installed in the folder : /usr/local/share/jupyter/kernels/, i only have a sagemath_9_2_all. before there was a Sagemaths_9_5 kernel there, i typed :

    jupyter kernelspec uninstall

and it said :

Couldn't find kernel spec(s): /usr/local/share/jupyter/kernels/SageMath-9.5/

so i have rm -r the 9.5 kernel and the problem remains the same…

  • the situation is : when i launch SageMaths, it proposes me :
  • terminal : works fine
  • jupyter : returns error : Firefox ne peut établir de connexion avec le serveur à l’adresse localhost:8888. except if i do "jupyter-lab" in the terminal before if so : nothings work (kernel error)

  • what i have done :

    pip install pip-autoremove pip-autoremove jupyter -y pip uninstall notebook pip uninstall jupyter_core pip install jupyterlab

without any success

  • i have not tried to install via conda because a cuple of months ago it worked very fine, without conda

  • thanks for your attention


1/03/2022 it works, endly, after reinstallation of SageMaths-9-5.app

edit retag flag offensive close merge delete

Comments

Reinstall Sage? What operating system?

slelievre gravatar imageslelievre ( 2022-02-17 00:50:47 +0100 )edit

i run macos Catalina

unfortunately, after reinstallation, the problem remains under an other form when i launch the jupyter notebook :

La connexion a échoué
ErWinz gravatar imageErWinz ( 2022-02-17 01:24:57 +0100 )edit

To fix the existing installation not connecting to Jupyter, deleting the folder

~/Library/Application\ Support/SageMath/9.4/Jupyter

might work, see

Otherwise, you could try installing via the sagemath-forge Conda distribution.

slelievre gravatar imageslelievre ( 2022-02-17 11:09:56 +0100 )edit

thanks very much i have a look

just to say that sagemaths works very fine with terminal just the jupyter dont work

ErWinz gravatar imageErWinz ( 2022-02-17 11:10:24 +0100 )edit

hi i dont want to fix Sagemaths to something else than jupyter i just want to make jupyter… work :-)

ErWinz gravatar imageErWinz ( 2022-02-17 23:32:17 +0100 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2022-02-17 11:07:16 +0100

slelievre gravatar image

Try installing with the sagemath-forge Conda distribution:

This is a repost from an original post on sage-devel answering a similar question:

Run the following commands in a terminal (careful, no spaces around "="). The $ at the start of each line represents the prompt, do not type it.

$ INSTALL_LOCATION=$HOME  # or your choice of location
$ SITE='https://github.com'
$ DIRS='isuruf/sagemath-forge/releases/latest/download'
$ FILE="sagemath-forge-$(uname)-$(uname -m).sh"
$ cd $INSTALL_LOCATION
$ curl -L -O $SITE/$DIRS/$FILE
$ bash $FILE

The script then asks a few questions; answering "yes" each time might work well.

Once sagemath-forge is installed, the underlying Conda can be activated or deactivated; activating it changes the PATH to include /path/to/sagemath-forge/bin where the executables installed by Conda are located.

So, to use the version of Sage installed via Conda:

$ conda activate

$ which sage
/path/to/sagemath-forge/bin/sage

$ sage
│ SageMath version 9.4, Release Date: 2021-08-22
│ Using Python 3.8.12. Type "help()" for help.
sage: %colors Linux
sage: 2 * 3 * 337
2022
sage: quit
Exiting Sage (CPU time 0m0.12s, Wall time 0m16.08s).

$ conda deactivate

To start Jupyter notebook or JupyterLab:

$ conda activate
$ jupyter notebook
$ jupyter lab
$ conda deactivate

To make Conda always active, add the line

$ conda activate

to a file that gets sourced every time you start a shell (e.g. in $HOME/.bash_profile if you use bash, or in the corresponding zsh file if you use zsh as your shell).

edit flag offensive delete link more

Comments

..........

ErWinz gravatar imageErWinz ( 2022-02-17 23:31:28 +0100 )edit
0

answered 2022-02-18 11:09:07 +0100

ErWinz gravatar image

updated 2022-03-01 08:43:57 +0100

..........

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-02-17 00:35:31 +0100

Seen: 1,633 times

Last updated: Mar 01 '22