Difference between revisions of "Creaing and using conda environment"

From HPC Guide
Jump to navigation Jump to search
(Created page with "In order to use conda, please load module miniconda/miniconda3-4.7.12-environmentally, using command: <pre> module load miniconda/miniconda3-4.7.12-environmentally </pre> To...")
 
 
Line 13: Line 13:
 
conda activate <module path>/envs/<MODULENAME>
 
conda activate <module path>/envs/<MODULENAME>
 
</pre>  
 
</pre>  
e.g.:
+
E.g.:
 
<pre>
 
<pre>
 
conda activate /powerapps/share/centos7/miniconda/miniconda3-4.7.12-environmentally/envs/jupyter
 
conda activate /powerapps/share/centos7/miniconda/miniconda3-4.7.12-environmentally/envs/jupyter
Line 22: Line 22:
 
conda create --prefix <path in your space>
 
conda create --prefix <path in your space>
 
</pre>
 
</pre>
e.g.
+
E.g.
 
<pre>
 
<pre>
 
conda create --prefix /a/home/cc/staff/dvory/envs/new_env
 
conda create --prefix /a/home/cc/staff/dvory/envs/new_env

Latest revision as of 10:47, 2 July 2023

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>