MeSU supercomputer offers Anaconda distributions of Python 2 and 3. In each of these, you will find few predefined environnements regrouping the most used softwares, which can be used as they are, or cloned in your home directory to customize them as needed.
Notice
This HOWTO has not been updated yet to take into new Conda installation on MeSU.
From now on, we recommend you rely on more recent modules : conda3-2019.10, conda3-2020.02 or later
More information are available on the User Guide of the Conda documentation, as well as a reminder of the most useful commands in the Conda cheatsheet (PDF).
Working with Anaconda
Loading a predefined conda environment
Before using the conda tools and environments, you must first load the appropriate module, chosen with module avail:
> module avail ... --------------------------------------- /opt/dev/Modules/Anaconda --------------------------------------- conda2/lua-torch conda2/R-3.4 conda3/simflow-cfd-py3 conda2/paraview-5.2 conda2/simflow-cfd ... > module load conda3/simflow-cfd-py3
Once the appropriate Conda module is load (using module load + environnent name) , you can gain access to the available Conda environments with the command conda-env list:
> conda-env list # conda environments: # Python-3.6_base /opt/dev/Langs/Conda3/envs/Python-3.6_base biologie /opt/dev/Langs/Conda3/envs/biologie lua-torch-py3 /opt/dev/Langs/Conda3/envs/lua-torch-py3 maths /opt/dev/Langs/Conda3/envs/maths simflow-cfd-py3 /opt/dev/Langs/Conda3/envs/simflow-cfd-py3 root * /opt/dev/Langs/Conda3
To activate your environment use the source activate command. Then if you want to check the available packages use the conda list command. For instance:
>source activate maths (maths) user@mesu1:~> conda list # packages in environment at /opt/dev/Langs/Conda3/envs/maths: # alabaster 0.7.9 py35_0 conda-forge aragorn 1.2.36 1 bioconda argcomplete 1.8.2 py35_0 conda-forge argparse 1.4.0 py35_0 bioconda args 0.1.0 py35_0 conda-forge argutils 0.3.2 py35_0 bioconda aria2 1.23.0 0 bioconda astalavista 3.2 0 bioconda astroid 1.4.8 py35_0 conda-forge astropy 1.3 np111py35_0 conda-forge ...
Creating your own conda environment
If the default environment of MeSU supercomputer does not suit you, the possibilty of initializing a new Conda environment from scratch, specifying the installation directory and the packages you want is feasible. You can use conda commands as user without root priviledge. For instance:
> conda create -p /path/to/your/new/env numpy boost alabaster vtk Fetching package metadata ........... The following NEW packages will be INSTALLED: alabaster: 0.7.10-py27he5a193a_0 boost: 1.65.1-py27_4 bzip2: 1.0.6-h6d464ef_2 ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py27_0 ...
To activate or deactivate a newly created Conda environment, use the commands source activate and source deactivate:
> source activate /path/to/your/new/env (newEnv) user@mesu1:~> source deactivate /path/to/your/new/env
Clone an existing conda environment
You can also clone one of the predefined conda environments (available through conda-env list) if most of the tools you wish to use are already present in it, then add new packages as necessary with the conda install command for instance:
> conda create -p /path/to/your/new/env --clone bio > source activate /path/to/your/new/env (yourNewEnv) > conda install vtk ...