Should conda, or conda-forge be used for Python environments?

tilikoom

Conda and conda-forge are both Python package managers. What is the appropriate choice when a package exists in both repositories? Django, for example, can be installed with either, but the difference between the two is several dependencies (conda-forge has many more). There is no explanation for these differences, not even a simple README.

Which one should be used? Conda or conda-forge? Does it matter?

darthbith

The short answer is that, in my experience generally, it doesn't matter which you use.

The long answer:

So conda-forge is an additional channel from which packages may be installed. In this sense, it is not any more special than the default channel, or any of the other hundreds (thousands?) of channels that people have posted packages to. You can add your own channel if you sign up at https://anaconda.org and upload your own Conda packages.

Here we need to make the distinction, which I think you're not clear about from your phrasing in the question, between conda, the cross-platform package manager, and conda-forge, the package channel. Anaconda Inc. (formerly Continuum IO), the main developers of the conda software, also maintain a separate channel of packages, which is the default when you type conda install packagename without changing any options.

There are three ways to change the options for channels. The first two are done every time you install a package and the last one is persistent. The first one is to specify a channel every time you install a package:

conda install -c some-channel packagename

Of course, the package has to exist on that channel. This way will install packagename and all its dependencies from some-channel. Alternately, you can specify:

conda install some-channel::packagename

The package still has to exist on some-channel, but now, only packagename will be pulled from some-channel. Any other packages that are needed to satisfy dependencies will be searched for from your default list of channels.

To see your channel configuration, you can write:

conda config --show channels

You can control the order that channels are searched with conda config. You can write:

conda config --add channels some-channel

to add the channel some-channel to the top of the channels configuration list. This gives some-channel the highest priority. Priority determines (in part) which channel is selected when more than one channel has a particular package. To add the channel to the end of the list and give it the lowest priority, type

conda config --append channels some-channel

If you would like to remove the channel that you added, you can do so by writing

conda config --remove channels some-channel

See

conda config -h

for more options.

With all of that said, there are four main reasons to use the conda-forge channel instead of the defaults channel maintained by Anaconda:

  1. Packages on conda-forge may be more up-to-date than those on the defaults channel
  2. There are packages on the conda-forge channel that aren't available from defaults
  3. You would prefer to use a dependency such as openblas (from conda-forge) instead of mkl (from defaults).
  4. If you are installing a package that requires a compiled library (e.g., a C extension or a wrapper around a C library), it may reduce the chance of incompatibilities if you install all of the packages in an environment from a single channel due to binary compatibility of the base C library (but this advice may be out of date/change in the future).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Python Anaconda: should I use `conda activate` or `source activate` in linux

From Java

Problems with python environments and packages in a conda managed machine

From Java

What is the right way to update Anaconda and Conda base & environments?

From Java

How update/remove conda-forge channel from Anaconda?

From Dev

Conda environments and .BAT files

From Dev

Conda and Python Modules

From Dev

conda creating environments. Parameter choice

From Dev

Are environments in conda a wrapper for pyenv?

From Dev

Failed to run Python script with Conda

From Dev

How to uninstall mini conda? python

From Dev

Conda attempts to install a large default library into new environments

From Dev

Conda remove all environments (except root)

From Dev

How to make conda virtual environments persistent and available for tools such as Jupyter Notebook?

From Dev

How to share conda environments across platforms

From Dev

Should conda, or conda-forge be used for Python environments?

From Dev

How to share conda environments across platforms

From Dev

Deploy a Python (Dash) app to Heroku using Conda environments (instead of virtualenv)

From Dev

conda install downgrade python version

From Dev

Specific package version with conda-forge

From Dev

Python Anaconda: should I use `conda activate` or `source activate` in linux

From Dev

How update/remove conda-forge channel from Anaconda?

From Dev

What is the full conda-forge channel url?

From Dev

remove cached (conda) environments in vscode for python

From Dev

How to make conda virtual environments persistent and available for tools such as Jupyter Notebook?

From Dev

Installing packages in conda environments fails when conda attempts to uninstall a root package

From Dev

Sound in python (conda)

From Dev

Require Jupyter Password across all Conda Environments

From Dev

Microsoft SQL Server 2017 and conda environments

From Dev

conda install -c conda-forge python-pdal Solving environment: | hangs when running windows 10

Related Related

  1. 1

    Python Anaconda: should I use `conda activate` or `source activate` in linux

  2. 2

    Problems with python environments and packages in a conda managed machine

  3. 3

    What is the right way to update Anaconda and Conda base & environments?

  4. 4

    How update/remove conda-forge channel from Anaconda?

  5. 5

    Conda environments and .BAT files

  6. 6

    Conda and Python Modules

  7. 7

    conda creating environments. Parameter choice

  8. 8

    Are environments in conda a wrapper for pyenv?

  9. 9

    Failed to run Python script with Conda

  10. 10

    How to uninstall mini conda? python

  11. 11

    Conda attempts to install a large default library into new environments

  12. 12

    Conda remove all environments (except root)

  13. 13

    How to make conda virtual environments persistent and available for tools such as Jupyter Notebook?

  14. 14

    How to share conda environments across platforms

  15. 15

    Should conda, or conda-forge be used for Python environments?

  16. 16

    How to share conda environments across platforms

  17. 17

    Deploy a Python (Dash) app to Heroku using Conda environments (instead of virtualenv)

  18. 18

    conda install downgrade python version

  19. 19

    Specific package version with conda-forge

  20. 20

    Python Anaconda: should I use `conda activate` or `source activate` in linux

  21. 21

    How update/remove conda-forge channel from Anaconda?

  22. 22

    What is the full conda-forge channel url?

  23. 23

    remove cached (conda) environments in vscode for python

  24. 24

    How to make conda virtual environments persistent and available for tools such as Jupyter Notebook?

  25. 25

    Installing packages in conda environments fails when conda attempts to uninstall a root package

  26. 26

    Sound in python (conda)

  27. 27

    Require Jupyter Password across all Conda Environments

  28. 28

    Microsoft SQL Server 2017 and conda environments

  29. 29

    conda install -c conda-forge python-pdal Solving environment: | hangs when running windows 10

HotTag

Archive