If I specify channels: in my env.yml file, the packages used for the env creation are indeed from this channel.
$ cat env.yml
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.8
- numpy
Create env:
$ conda env create -n test -f env.yml
$ conda activate test
The packages are installed though the correct channel:
$ conda list
# packages in environment at /home/mathurin/anaconda3/envs/test:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
But when, inside this env, I later install other packages, they are still from the defaults channels:
$ conda config --show channels
channels:
- defaults
How can I tell conda to set, once and for all, the channels to something for this env, and can it be done inside the environement.yml ?