Skip to content

Commit

Permalink
added conda notification for recommended usage
Browse files Browse the repository at this point in the history
Also provided some more context of the different
conda providers.

Signed-off-by: Nick Papior <nicpa@dtu.dk>
  • Loading branch information
nicpa-dtu committed Jan 28, 2025
1 parent e62dd37 commit e9f67fe
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 10 deletions.
8 changes: 5 additions & 3 deletions docs/install/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

.. _install-python:

Install Python
=================
Install Python
==============


.. dropdown:: License and terms of use of Anaconda
Expand All @@ -30,7 +30,7 @@ Install Python
vs.

.. code:: shell
numpy pkgs/linux-64::numpy-2.1.0-py311hed257a2_0
We are pursuing strategies to completely remove the Anaconda repositories
Expand All @@ -40,6 +40,8 @@ Install Python
For full details of the license, please read them on
`here <https://legal.anaconda.com/policies/en/?name=terms-of-service#anaconda-terms-of-service>`__.

See :ref:`here <rec-conda>` for more details.


In this section, you will find different installation guides that cover the
same components:
Expand Down
6 changes: 3 additions & 3 deletions docs/internal/exercises.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Exercise 1
Likely there will be some students with a prior ``conda`` installation.
It is thus important that you know how to have a ``conda`` installation
*and* navigate a regular Python installation.
Create a `new environment <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment>`_ in a local folder.
Understand that:
Expand All @@ -121,9 +121,9 @@ Exercise 1
a. Packages can be installed from an *external* command, such as ``conda install -n <path to environment> <packages>``,
b. Packages will be installed directly if the environment is already the activated one: ``conda activate <path to environment>``
4. How can you see if you are in a ``conda`` environment?
5. Ensure you can navigate between both the ``conda`` and the official Python installation.
Expand Down
2 changes: 1 addition & 1 deletion docs/internal/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ something they do not really care for.
If it seems that the student *just* want a working installation, then opt in to
aid with few, if any, side steps.


.. danger::
Engaging through online channels may, sometimes, spur comments that are
inappropriate.
Expand Down
6 changes: 3 additions & 3 deletions docs/learn-more/packages-and-environments/packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ Packages can be installed to your specific environment by using ``conda install`

.. code:: powershell
conda install "numpy==1.24.*" "scipy<1.10" "matplotlib"
conda install "package-a==1.24.*" "package-b<1.10" "package-c"
.. tab-item:: {{ macos }}
:sync: mac

.. code:: bash
conda install "numpy==1.24.*" "scipy<1.10" "matplotlib"
conda install "package-a==1.24.*" "package-b<1.10" "package-c"
The above command will install specific versions of the listed packages, which can be important for
maintaining compatibility and stability in your environment. The above will install version 1.24 of
Numpy, a Scipy version lower than 1.10, and the latest version of matplotlib.
`package-a`, a `package-b` version lower than 1.10, and the latest compatible version of `package-c`.


Navigating packages
Expand Down
93 changes: 93 additions & 0 deletions docs/rec/conda.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.. _rec-conda:

Conda
=====

Conda will in this context be used to describe a ``conda`` command provider.
The programs listed here, all provide this ``conda`` command, which it-self enables
the installation and environment management commands required for a seamless
usage of open-source software.

When people refer to ``Conda``, some mean ``Miniconda``, others ``Anaconda``, and some
even ``Miniforge``.
However, generally users do not care if the ``conda`` provider is one or the other.

Similarly, when software recommends one or the other, it will likely still be installable
by using any of the other providers. So please select the provider once, and adapt
installation procedures as noted in the below sections.


.. _rec-conda-anaconda:

Anaconda
========

.. danger::

Anaconda installations default to download content from
a *channel* that is licensed, i.e. *not free*!

The `terms of service <https://legal.anaconda.com/policies/en/>`__
has this small snippet (as of January 2025):

| Your registration, download, use, installation, access, or enjoyment
| of all Anaconda Offerings on behalf of an organization that has two
| hundred (200) or more employees or contractors (“Organizational Use”)
| requires a paid license of Anaconda Business or Anaconda Enterprise.
| For sake of clarity, use by government entities and nonprofit entities
| with over 200 employees or contractors is considered Organizational Use.
This means that in order to install and use software provided through the
Anaconda channels (which is the default!) is requiring one to pay for the
software.

DTU does *not* recommend the installation of **Anaconda** since any non-teaching
use will violate their terms of service.

Instead please follow the installation instructions :ref:`here <install-python>`
which will ensure that you are only installing things from the ``conda-forge`` channel,
which is free.



.. _rec-conda-miniconda:

Miniconda
=========

While Miniconda is hosted, and maintained by the Anaconda company, it can be used
in a *free* form by changing the default channel to ``conda-forge``.

.. danger::

One will *have* to change the default channel *just after installation*
to ensure no terms of service violation.


Miniconda will be installed if you follow the
:ref:`installation instructions <install-python>`.

The change is a one-time change that defaults the installation sources to the
correct tree.

.. code:: shell
conda config --add channels conda-forge
conda config --remove channels defaults
.. attention::

Please be aware of installation instructions that install packages
from the Anaconda channels. If in doubt, feel free to
:mail:`contact us <pythonsupport@dtu.dk>`.



.. _rec-conda-miniforge:

Miniforge
===============================================

This ``conda`` provider defaults to not use any Anaconda channels, and will
thus be the easiest one to ensure no license violations.

0 comments on commit e9f67fe

Please sign in to comment.