Skip to content

Instantly share code, notes, and snippets.

@atifraza
Created March 30, 2020 20:16
Show Gist options
  • Save atifraza/a9d1aa39bddca923b1550150c11bf0cb to your computer and use it in GitHub Desktop.
Save atifraza/a9d1aa39bddca923b1550150c11bf0cb to your computer and use it in GitHub Desktop.
Intricacies of conda package manager

When installing a package from a non-defaults channel, we usually do:

conda install -c conda-forge packagename

This has the side effect of adding conda-forge as a higher priority channel then defaults Alternatively, we can now use

conda install conda-forge::packagename

to only have the specified packagename to be installed from conda-forge, or one could do:

conda install -c defaults -c conda-forge packagename

But this is verbose and one could certainly forget this. Alternatively, adding the conda-forge channel, or better, appending the conda-forge channel to the available channels is a better option. The list of available channels with their priority is obtained by:

conda config --show channels

And, adding/appending a channel is done using:

conda config --add conda-forge
# OR
conda config --append conda-forge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment