Ask Your Question

Revision history [back]

The SageNB notebook is only available for Python2-based versions of Sage.

Starting with Sage 9.0, the binaries we provide are Python3-based.

The workaround is to build a Python2-based Sage from source (possible up to Sage 9.1).

For this:

  • install the prerequisites:
    • Apple's command-line tools for developers, with or without Xcode
    • optionally Homebrew and a few recommended Homebrew packages
  • get the sources (either by git clone or by downloading the tarball from the Sage download page)
  • extract the sources, change to the sources directory, and run the following commands

    $ export MAKE='make -j4 -s V=0'  # to build using four jobs in parallel
    $ source ./.homebrew-build-env  # to use Homebrew packages
    $ make configure
    $ ./configure --with-python=2
    $ make openssl  # unless openssl is installed via Homebrew
    $ make

Sage 9.2 and beyond are Python3-only, they do not allow building for Python 2, and the SageNB notebook is abandoned.

Note that you can also convert your SageNB worksheets to Jupyter worksheets and start using the Jupyter Notebook.