Does setting channel_priority to "strict" affect all Conda environments?

Viewed 1353

I created a Conda environment with R using the conda-forge channel instructions:

  1. conda config --add channels conda-forge
  2. conda config --set channel_priority strict

Question: It seems that channel priority also affects the base environment as I am now not able to install or update any packages from the base env using conda update ... or conda install

Is the configuration setting channel_priority global? i.e., does it affect all Conda environments?

1 Answers

Yes, it is a global setting. If you don't want it to be global, then activate the environment for which you wish to make the specific setting change, then use the --env flag. E.g.,

conda activate myenv
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict

And yes, switching to conda-forge as your highest priority channel when your base was originally from Anaconda is formidable. Better off leaving base with the defaults channel prioritized or switching to Miniforge.

Related