Ask Your Question
2

Working through the Sage tutorial in a notebook error.

asked 2021-04-30 09:31:51 +0100

Buk gravatar image

updated 2021-04-30 09:33:24 +0100

The Sage tutorial says:

or from the Sage notebook (click Help, then click Tutorial to interactively work through the tutorial from within Sage).

but when I follow those directions I get:

``` 404 : Not Found

You are requesting a page that does not exist! ```

The url in the new tab that appears is:

http://localhost:8888/kernelspecs/sagemath/doc/tutorial/index.html?v=20210430004223

And the notebook server shows:

``` [W 08:24:19.246 NotebookApp] 404 GET /kernelspecs/sagemath/doc/tutorial/index.html?v=20210430004223

(127.0.0.1) 19.26ms referer=http://localhost:8888/notebooks/Untitled2.ipynb ```

What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-04-30 10:31:22 +0100

slelievre gravatar image

updated 2021-04-30 12:04:16 +0100

Unfortunately that does not work with Jupyter.

Making it work with Jupyter is tracked at

So far, live documentation only works with SageNB, which was the "Sage notebook" before the Jupyter notebook.

Unfortunately, the SageNB notebook does not work with Python 3, so it is only available with versions of SageMath compiled for Python 2.

Sage transitioned from Python 2 to Python 3 in the SageMath 8.x and 9.x versions:

  • SageMath 8.x versions were primarily Python 2 based, with growing Python 3 capability.
  • SageMath 9.x versions were primarily Python 3 based, with still an option to compile for Python 2 in SageMath 9.0 and 9.1.

Unless otherwise stated, SageMath binaries and installers are

  • based on Python 2 up to SageMath 8.9,
  • based on Python 3 starting from SageMath 9.0.

Building SageMath from source, there is a little more leeway:

  • the late SageMath 8.x could also be compiled for Python 3 using

    ./configure --with-python=3
    
  • the early SageMath 9.x could also be compiled for Python 2 using

    ./configure --with-python=2
    

On Windows, to get live documentation, use SageMath 8.9 (it can coexist with SageMath 9.2).

Download the installer from one of these locations (the installer you get from either location is the same):

Let's hope "live Sage documentation for Jupyter" will be available in a not too distant future.

edit flag offensive delete link more

Comments

I have 9.2 precompiled for windows.using Python 3.7.7

I do not know what SageNB notebook is? I have three items in the start menu:

  • SageMath 9.2 ...........Opens a "console", which appears to be a REPL. If I type tutorial() here I get:

sage: tutorial() sh: /opt/sagemath-9.2/local/bin/sage-native-execute: /bin/sh: bad interpreter: Bad address

  • SageMath 9.2 shell ...Opens a "shell", with a unix style prompt -- no idea what that is for yet.
  • SageMath 9.2 Notebook...Opens a "notebook server" and launches jupyter in a browser tab.

I don't need a unix shell; and the console doesn't seem to do anything useful.

On the other hand, the jupyter notebook environment is quite wonderful. Sham ethe tutorial doesn't work there :(

Buk gravatar imageBuk ( 2021-04-30 11:28:59 +0100 )edit

Thanks for the comprehensive explanation. 8.9 downloading now.

I'm looking forward to the live tutorial.

Buk gravatar imageBuk ( 2021-04-30 17:25:38 +0100 )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: 2021-04-30 09:31:51 +0100

Seen: 526 times

Last updated: Apr 30 '21