Ask Your Question
1

Error executing notebook() in sage 9 (OS X 10.11.6)

asked 2020-07-24 13:09:27 +0100

jlruiz gravatar image

Hi,

I get the following error when executing notebook() or inotebook() in sage 9.0 in mac os x 10.11.6:

ImportError: cannot import name 'smtp' from 'twisted.mail' (unknown location)

and of course I get no notebook open in navigator as usual.

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-24 16:41:11 +0100

slelievre gravatar image

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.

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: 2020-07-24 13:09:27 +0100

Seen: 102 times

Last updated: Jul 24 '20