Creaing and using conda environment

From HPC Guide
Revision as of 10:47, 2 July 2023 by Dvory (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In order to use conda, please load module miniconda/miniconda3-4.7.12-environmentally, using command:

module load miniconda/miniconda3-4.7.12-environmentally

To see all available environment you may type the below command. Maybe there is already an environment for what you need

conda env list

And to load an environment, please perform:

conda activate <module path>/envs/<MODULENAME>

E.g.:

conda activate /powerapps/share/centos7/miniconda/miniconda3-4.7.12-environmentally/envs/jupyter

If you would like to have your own environment within this conda, and to be able to install there something, please perform the following right after loading the environmentally module:

conda create --prefix <path in your space>

E.g.

conda create --prefix /a/home/cc/staff/dvory/envs/new_env

Then activate it with

conda activate /a/home/cc/staff/dvory/envs/new_env

To install something in your conda environment:

conda install <module>

To deactivate an environment:

conda deactivate

To unload a module:

module unload <module name>