Ask Your Question
0

Error: No module named 'sagenb'

asked 2020-11-29 12:24:26 +0200

MKS gravatar image

updated 2020-11-29 13:02:07 +0200

SageMath is not working on Ubuntu 20.04. When I am going to open notebook interface it show the following errors:

https://imgur.com/a/aQQkUSQ

How can I fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-29 13:10:49 +0200

Emmanuel Charpentier gravatar image

Your banner tells us that you are running a Python 3-based Sage. sagenb (the classical notebook) is NOT compatible/supportable with Python 3. This incompatibility has been known and published for a long time, and this classicalnotebook has been deprecated for a while...

If you want to use a Python 3-based Sage, you have to use the Jupyter notebook (or another interface, such sage-shell-mode for emacs, or the JupyterLab notebook (optional package)).

If you insist on the classical Sage notebook, you have to install a Python 2-based Sage. As far as I can tell, in has been announced that 9.1 would be the last Sage version to support Python 2. Furthermore, I do not know if precompiled Python 2-based package(s) exist(s) for which distribution(s). Last but not least, choosing to stay with Python 2-based Sage entails staying with (at best) Sage 9.1. Since Sage 9.2, the Python 2-specific code is being pruned from Sage source...

BTW : in 9.3.beta2, notebook() no longer exists...

HTH,

edit flag offensive delete link more

Comments

@ EmmanuelCharpentier BUt it does not solve my problem how to fix it?

MKS gravatar imageMKS ( 2020-11-30 04:22:19 +0200 )edit

Paraphrasing what I already wrote, you can either install a Python 2-based Sage and stay with it, or renounce the classical Sage notebook.

In other words you can't "fix it".

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-11-30 06:36:15 +0200 )edit

If you run sage -n instead of sage, it will open up the Jupyter notebook, by the way.

John Palmieri gravatar imageJohn Palmieri ( 2020-11-30 07:25:22 +0200 )edit

@ JohnPalmieri I did according to you, but shows access denied: Access to the file was deniedThe file at file:///home/mks/.local/share/jupyter/runtime/nbserver-9493-open.html is not readable. It may have been removed, moved, or file permissions may be preventing access. ERR_ACCESS_DENIED

MKS gravatar imageMKS ( 2020-11-30 10:58:41 +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

1 follower

Stats

Asked: 2020-11-29 12:24:26 +0200

Seen: 532 times

Last updated: Nov 29 '20