Activate a conda environment¶
How to list existing conda environments?¶
Existing environments can be listed with the following command:
Example
...
base /usr/local/bioinfo/src/Miniforge/Miniforge3
PPanGGOLiN-v2.2.1_env /usr/local/bioinfo/src/Miniforge/Miniforge3/envs/PPanGGOLiN-v2.2.1_env
...
/work/project/<my-project>/envs/my-env
In this example, there are 4 kinds of environment:
-
The environment
my-envcreated by yourself. It is stored into/home/<username>/.conda/envs/my-envand was created with the option-n my-env. -
The conda
baseenvironment. It was created when installing conda on the cluster. You cannot modify it. -
An environment
PPanGGOLiN-v2.2.1_env. It was created by GenoToul-Bioinfo in order to installPPanGGOLiN-v2.2.1_env. You cannot modify it. -
An environment without name stored into
/work/project/<my-project>/my-env. It was created by using the option-p.
How to activate an environment?¶
Replace </path/to/my/env> by the path to environment (or by its name if created with option -n)
Activation command
On the cluster, conda environment is activated using source activate <env> command instead of conda activate <env> command.
Example
We activate environment compare-align we created previously