Anaconda (conda)
Anaconda package manager (predominantly Python)This page is outdated!
This page is outdated! Our anaconda3 module is only available on CLX. Anaconda channels cannot be offered any more due to new policies by Continuum.
Description
Anaconda is a package manager commonly used for Python.
Prerequisites
None
Modules
The anaconda3 module. See Python for the available versions. To load version 2020.11 for Python 3, you would do
module load anaconda3/2020.11
Now, in order to use it, you need to source the anaconda init shell script. You can either always run
source $CONDASH
after loading the module, or if you want to only use one version of anaconda3 and have it available every time you log in, you can enter
conda init SHELL
where SHELL is the name of the shell that you use, which will most likely be bash , tcsh , or zsh .
Creating And Loading Environments
conda (and mamba) work with environments that can have their own packages completely separate from each other. When you create an environment, you can specify any packages you want to install (note, you can install more later). For example, it is common to specify the exact Python version you want in case you don't want the default. To create the environment FOO with Python 3.8 package along with various other packages, you would use
conda create -n FOO python=3.8 PACKAGE1 PACKAGE2 ...
To enter an environment (make it the active on in use), you activate it like
conda activate FOO
To leave the environment, you deactivate it like
conda deactivate
For more details on how to use conda, check out the conda tutorial.