Managing Environments with Conda¶
Conda is a package manager in Anaconda that allows you to create and manage multiple environments where you can pick and choose which packages you want to use. To use Conda you must load an Anaconda module:
Many packages are pre-installed in the global environment. To see these packages:
To create your own custom environment:
The --name option specifies that the environment created will be named MyEnvName. You can include as many packages as you require separated by a space. Including the -y option lets you skip the prompt to install the package. By default environments are created and stored in the $HOME/.conda directory.
To create an environment at a custom location:
To see a list of your environments:
To remove unwanted environments:
To remove a package from an environment:
Installing packages when creating your environment, instead of one at a time, will help you avoid dependency issues.
To activate or deactivate an environment you have created:
If you created your conda environment at a custom location using --prefix option, then you can activate or deactivate it using the full path.
To use a custom environment inside a job you must load the module and activate the environment inside your job submission script. Add the following lines to your submission script:
For more information about Python: