How to use python

Software
Version
Cluster
python
3.8.17
Dardel

Load the Anaconda module

To list all available Anaconda modules on Dardel, type:

$ module load PDC/22.06
$ module load pdc-anaconda3/2021.05

After loading an Anaconda module, there are information on how to use the anaconda module:

JUST LOADING THIS MODULE DOES *NOT CHANGE THE PYTHON VERSION, NOR ENABLES ANY EXTRA PYTHON MODULES. This module makes available the ‘conda’ command, with which users can create named anaconda environments and then activate them. To create and use a customized environment use ‘conda create …’ and then ‘conda activate …’ (see example below)*.

Create your own environment

We recommend that you create a ~/.condarc file with the following lines:

pkgs_dirs:
    - /cfs/klemming/<project>/username/conda-dirs/pkgs
envs_dirs:
    - /cfs/klemming/<project>/username/conda-dirs/envs

Remember to replace <project> by your project direction and username by your username.

Then you can create your own conda environment by the following command.

$ mkdir -p /cfs/klemming/<project>/username/conda-dirs/pkgs
$ mkdir -p /cfs/klemming/<project>/username/conda-dirs/envs
$ conda create --prefix /cfs/klemming/<project>/username/conda-dirs/envs/my-conda-env python=3.8

Notice that replace <project> by your project direction and username by your username as that in the ~/.condarc.

After the environment is created you can activate it by:

$ conda activate my-conda-env
(my-conda-env)$ python ...

To deactivate your environment or the base environment, use conda deactivate.

Disclaimer

PDC takes no responsibility for the correctness of results produced with the binaries. Always evaluate the binaries against known results for the systems and properties you are investigating before using the binaries for production jobs.