Skip to content

Commit

Permalink
sagemathgh-37588: Update Conda installation instructions to use Minif…
Browse files Browse the repository at this point in the history
…orge

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Based on the discussion in https://groups.google.com/g/sage-
devel/c/GaQHdu0Q6UU and sagemath#37184, we
now follow the offical recommendation and use Miniforge over the  soft-
deprecated Mambaforge. Since we are exclusively testing on miniforge,
this change also aligns the docs with the ci.

Moreover, I've removed the recommendation to install mamba (using `conda
install mamba`) which is not recommended according to the [offical
docs](https://mamba.readthedocs.io/en/latest/installation/mamba-
installation.html#existing-conda-install-not-recommended).

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

URL: sagemath#37588
Reported by: Tobias Diez
Reviewer(s): Matthias Köppe, roed314, William Stein
  • Loading branch information
Release Manager committed Mar 14, 2024
2 parents 685e86b + 40de356 commit 83d81f5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 27 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=facd0b123855a68d836680b22177058ac3333aad
md5=180414ef1a73c5cc12a657abb5affb63
cksum=101476296
sha1=ecd112699d45a08acc904081495200200aa5375d
md5=15351e13c37ab18a3dca25db30f45e33
cksum=1274317165
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5c45eed9e45a60223067282bb70cdb805d66eeff
86e1c3569bfb8b90061cf3aa01801677d0b9cc9e
53 changes: 30 additions & 23 deletions src/doc/en/installation/conda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,27 @@ SageMath can be installed on Linux and macOS via Conda from the
Both the ``x86_64`` (Intel) architecture and the ``arm64``/``aarch64``
architectures (including Apple Silicon, M1) are supported.

You will need a working Conda installation: either Mambaforge/Miniforge,
You will need a working Conda installation: either Miniforge (or Mambaforge),
Miniconda or Anaconda. If you don't have one yet, we recommend installing
`Mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`_ as
`Miniforge <https://github.com/conda-forge/miniforge>`_ as
follows. In a terminal,

.. code-block:: shell
$ curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh
$ sh Mambaforge-$(uname)-$(uname -m).sh
$ curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
$ bash Miniforge3-$(uname)-$(uname -m).sh
* Mambaforge and Miniforge use conda-forge as the default channel.
* Miniforge (and Mambaforge) use conda-forge as the default channel.

* If you are using Miniconda or Anaconda, set it up to use conda-forge:

* Add the conda-forge channel: ``conda config --add channels conda-forge``

* Change channel priority to strict: ``conda config --set channel_priority strict``

Optionally, use `mamba <https://github.com/mamba-org/mamba>`_,
If you installed Miniforge (or Mambaforge), we recommend to use
`mamba <https://mamba.readthedocs.io/en/latest/index.html>`_ in the following,
which uses a faster dependency solver than ``conda``.
If you installed Mambaforge, it is already provided. Otherwise, use

.. code-block:: shell
$ conda install mamba

.. _sec-installation-conda-binary:

Expand All @@ -43,10 +38,17 @@ Installing all of SageMath from conda (not for development)

Create a new conda environment containing SageMath, either with ``mamba`` or ``conda``:

.. code-block:: shell
.. tab:: mamba

.. code-block:: shell
$ mamba create -n sage sage python=X # either
$ conda create -n sage sage python=X # or
$ mamba create -n sage sage python=X
.. tab:: conda

.. code-block:: shell
$ conda create -n sage sage python=X
where ``X`` is version of Python, e.g. ``3.9``.

Expand Down Expand Up @@ -109,17 +111,22 @@ Here we assume that you are using a git checkout.

$ export SAGE_NUM_THREADS=24

- As a recommended step, install the ``mamba`` package manager. If
you skip this step, replace ``mamba`` by ``conda`` in the
following steps::

$ conda install mamba

- Create and activate a new conda environment with the dependencies of Sage
and a few additional developer tools::

$ mamba env create --file src/environment-dev-3.11-linux.yml --name sage-dev
$ conda activate sage-dev
.. tab:: mamba
.. code-block:: shell
$ mamba env create --file src/environment-dev-3.11-linux.yml --name sage-dev
$ conda activate sage-dev
.. tab:: conda
.. code-block:: shell
$ conda env create --file src/environment-dev-3.11-linux.yml --name sage-dev
$ conda activate sage-dev

Alternatively, you can use ``src/environment-3.11-linux.yml`` or
``src/environment-optional-3.11-linux.yml``, which will only install standard
Expand Down

0 comments on commit 83d81f5

Please sign in to comment.