Differences between revisions 1 and 17 (spanning 16 versions)
Revision 1 as of 2017-03-26 18:49:21
Size: 1511
Editor: saraedum
Comment: initial version
Revision 17 as of 2021-06-27 17:27:29
Size: 1992
Editor: isuruf
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Experimental [[https://conda.io/docs/|Conda]] packages for Linux & OSX are available through [[https://conda-forge.github.io/|conda-forge]]. {{https://conda.io/docs/_images/conda_logo.svg||width=400px}}

[[https://conda.io/docs/|Conda]] packages for Linux & macOS are available through [[https://conda-forge.github.io/|conda-forge]].
Line 5: Line 7:
In short: Install `sage` from conda-forge. In short: Install `sage` from [[https://conda-forge.org|conda-forge]].
Line 7: Line 9:
To install sage on your machine (without the need for root permissions):  * Download and install [[https://github.com/conda-forge/miniforge/#mambaforge|Mambaforge]].
   i.e., open a Terminal,
     `curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-\$(uname)-\$(uname -m).sh`
Line 9: Line 13:
 * Install [[https://conda.io/miniconda.html|Miniconda for Python 3]] (Python 2 version fails to copy "Hängematte" which comes with rw)
 * export your `PATH` (and `hash -r` or `rehash`)
 * Make sure your locale is UTF-8.
 * Add the `conda-forge` channel: `conda config --add channels conda-forge`
 * Update all packages: `conda update --all` (otherwise you get weird errors due to inconsistencies later)
 * create an environment for sage: `conda create -n sage sagelib future`
 * enter your environment: `source activate sage`
 * enjoy: `sage`
     `sh Mambaforge-\$(uname)-\$(uname -m).sh`
 * Create a "sage" environment and pick a version of SageMath, i.e., open a new terminal and `mamba create -n sage sage=9.3`
 * To run SageMath, activate the environment you just created and run SageMath, i.e., `source activate sage` and `sage`
Line 18: Line 17:
= Development = = Maintenance =
Line 21: Line 20:

= Conda for Sage Developers =

You can develop Sage without building any of its dependencies (experimental). On my machine this takes 5 minutes:

{{{
$ export SAGE_NUM_THREADS=24
$ conda install mamba
$ mamba create -n sage-build python=3.9 gettext autoconf automake libtool
$ conda activate sage-build
$ ./bootstrap
$ mamba env update -n sage-build -f src/environment-optional.yml
$ ./configure --prefix=$CONDA_PREFIX
$ cd src
$ python setup.py install
$ sage -c 'print(version())'
SageMath version 9.2, Release Date: 2020-10-24
}}}
Line 25: Line 42:
There are still some issues with Conda. Not all tests pass and some things don't work:
 * #20382
 * …
Line 29: Line 43:
== MacOS ==
Packages do not exist yet. We are waiting for #12426 to get merged.
To check whether there are known issues with Conda:

 * https://trac.sagemath.org/query?order=id&desc=1&summary=~conda
Line 33: Line 48:

https://conda.io/docs/_images/conda_logo.svg

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

Setting Up

In short: Install sage from conda-forge.

  • Download and install Mambaforge.

    • i.e., open a Terminal,
      • curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-\$(uname)-\$(uname -m).sh

        sh Mambaforge-\$(uname)-\$(uname -m).sh

  • Create a "sage" environment and pick a version of SageMath, i.e., open a new terminal and mamba create -n sage sage=9.3

  • To run SageMath, activate the environment you just created and run SageMath, i.e., source activate sage and sage

Maintenance

The packages necessary to run sage are developed on the github pages of conda-forge. The actual sage package and many of its dependencies are maintained by Isuru Fernando (and a few volunteers).

Conda for Sage Developers

You can develop Sage without building any of its dependencies (experimental). On my machine this takes 5 minutes:

$ export SAGE_NUM_THREADS=24
$ conda install mamba
$ mamba create -n sage-build python=3.9 gettext autoconf automake libtool
$ conda activate sage-build
$ ./bootstrap
$ mamba env update -n sage-build -f src/environment-optional.yml
$ ./configure --prefix=$CONDA_PREFIX
$ cd src
$ python setup.py install
$ sage -c 'print(version())'
SageMath version 9.2, Release Date: 2020-10-24

Open Issues

General

To check whether there are known issues with Conda:

Windows

There is likely not going to be a working package in the near future, see https://groups.google.com/d/msg/sage-devel/wyaV8x5qolI/jVS4DKBvCAAJ.

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