Conda packages for Linux & macOS are available through conda-forge.

Setting Up

In short: Install sage from conda-forge.

The above instructions are being added to the Sage documentation in

Conda for Sage Developers

You can develop Sage without building any of its dependencies (experimental) --- on my machine this takes 5 minutes. Assume you obtained Sage source tree and changed to its root. These instructions have been updated for #30845 and are being added to the Sage installation guide in #33426

$ export SAGE_NUM_THREADS=24                             # or whatever the meaningful value
                                                         # for your machine is - no more than 
                                                         # the number of cores.

$ conda install mamba                                    # This is a recommended optional step.
                                                         # If you skip it, replace "mamba" by
                                                         # "conda" in the following steps.

$ mamba create -n sage-build python=3.9 \
      gettext autoconf automake libtool pkg-config       # or replace 3.9 by another version

$ conda activate sage-build

$ ./bootstrap                                            # this generates src/environment.yml
                                                         # used in the next step

$ mamba env update -n sage-build -f src/environment.yml  # alternatively, use 
                                                         # src/environment-optional.yml 
                                                         # for some additional packages
$ conda activate sage-build

$ ./configure --with-python=$CONDA_PREFIX/bin/python             \
              --prefix=$CONDA_PREFIX                             \
              $(for pkg in $(./sage -package list :standard:     \
                               --has-file spkg-configure.m4      \
                               --has-file distros/conda.txt); do \
                    echo --with-system-$pkg=force;               \

$ pip install --no-build-isolation -v -v --editable pkgs/sage-conf pkgs/sage-setup 

$ pip install --no-build-isolation -v -v --editable src

$ sage -c 'print(version())'
SageMath version 9.6.beta5, Release Date: 2022-03-12

By using pip install --editable, the Sage library is installed in editable mode. This means that when you only edit Python files, there is no need to rebuild the library; it suffices to restart Sage.

After editing any Cython files, rebuild by repeating the command

$ pip install --no-build-isolation -v -v --editable src

More information


Conda (last edited 2022-04-25 21:52:34 by mkoeppe)