Issue to be resolved
Creating a Conda environment or installing a package causes an indefinite hang.
Solution
There are a few steps required to mitigate this issue. It is caused by Conda attempting to search/install from the “defaults” channel.
1) Ensure you are using the miniforge module, and NOT anaconda.
2) Also ensure your .condarc file (in your home directory) does not contain the “defaults” entry under the channels section by running the following commands:
> module load miniforge
> conda config --add channels conda-forge
> conda config --remove channels defaults
No further steps are needed if you’re using conda create.
However, conda install has a caveat. When invoked, it will try to search all channels that correspond to packages in the environment. This means that for environments already containing licensed Anaconda packages, conda install will attempt to read from “defaults” again. This will fail as expected. You can simply run the exact same command again and conda install will drop “defaults.”
NOTE: For conda create and conda install — If necessary, you can always specify the channel with -c <channel> and –override-channels.
# Example:
> conda install numpy -c conda-forge --override-channels
> conda install cuda -c nvidia --override-channels
3) If creating the environment using a YAML file, (via “conda env create -f <filename>”) you can add the following to the environment file:
channels:
- conda-forge
- nodefaults
If you need any other channels, you can add them as well (e.g. “nvidia”). Using “nodefaults” will instruct Conda not to use the default Anaconda packages, which require a license.
For more information: See the Conda documentation

