Ask Your Question

Revision history [back]

Building Sage 9.1 and SageNB from source

Here are the steps to build Sage and SageNB from source, and to launch the SageNB notebook.

Build

Here are the steps I would suggest.

Note that the ./configure output will end with a list of recommendations of additional system packages to install. Following those recommendations can speed up the make step.

If you know you already have all the possible recommended software and you want the ./configure step to be less verbose, add -q (for "quiet") to the ./configure line, after --enable-sagenb=yes.

Linux

Configure

$ V=0
$ MAKE='make -j1'
$ make configure
$ ./configure --with-python=2 --enable-sagenb=yes

Make

$ make -s V=0

macOS

Preliminary brew installation:

$ brew install gcc@9

Configure

$ V=0
$ MAKE='make -j1'
$ source .homebrew-build-env
$ make configure
$ FC=gfortran-9 ./configure --with-python=2 --enable-sagenb=yes

Make

$ make -s V=0 openssl
$ make -s V=0

Launch

Launch the Sage notebook

$ ./sage -n sagenb

Building Sage 9.1 and SageNB from source

Here are the steps to build Sage and SageNB from source, and to launch the SageNB notebook.

BuildBuild Sage and SageNB

Here are the steps I would suggest.

Note that the ./configure output will might end with a list of recommendations of additional system packages to install. Following those recommendations can speed up the make step.

If you know you already have all the possible recommended software and you want the ./configure step to be less verbose, add -q (for "quiet") to the ./configure line, after --enable-sagenb=yes.

Linux

Configure

$ V=0
$ MAKE='make -j1'
$ make configure
$ ./configure --with-python=2 --enable-sagenb=yes

Make

$ make -s V=0

macOS

Preliminary brew installation:

installation

If brew is not installed yet, install it following the instructions at

  • https://brew.sh

Then run

$ brew update
$ brew install gcc@9

autoconf automake bdw-gc boost cairo ccache \ cmake coreutils cryptominisat curl curl-openssl docutils \ ffmpeg fontconfig freetype gambit gcc@9 gd gettext glib \ glpk gmp gnutls gsl imagemagick isl jpeg libffi libmpc \ libogg libomp libpng libtiff libtool mpfi mpfr mpir nauty \ ncurses ninja numpy octave open-mpi openblas openjdk \ openjpeg openssl@1.1 pandoc pari pkg-config ppl python@3.7 \ r readline scipy scons sip sphinx-doc sqlite suite-sparse \ wget xz yasm zeromq

Configure

$ V=0
$ MAKE='make -j1'
$ source .homebrew-build-env
$ make configure
$ FC=gfortran-9 ./configure --with-python=2 --enable-sagenb=yes

Make

$ make -s V=0 openssl
$ make -s V=0

LaunchSymbolic link

Add a symbolic link to your Sage installation somewhere in your PATH.

For example by running this from the sage root folder:

$ ln -sf `pwd`/sage /usr/local/bin

of if that complains about a permission problem,

$ sudo ln -sf `pwd`/sage /usr/local/bin

which might require entering the password for your user account on the computer on which you are installing.

Check that this worked by running

$ which sage
$ sage --version

Launch the SageNB notebook

Launch the Sage notebook

$ ./sage notebook by running this in the terminal:

$ sage -n sagenb