Due to limited user-level permissions on managed clusters, installing and maintaining Python packages becomes a challenging task for novice users. This script uses Anaconda environments and environment modules (Lmod) to simplify this process. There are three simple steps to install and use Python packages using conda-env-mod:
- Create an Anaconda environment using
conda-env-mod. During the process, the script automatically creates module file for using the environment. - Load the module generated by
conda-env-mod. By default modules are generated in$HOME/privatemodules. You will need to add it to your$MODULEPATH. - Now use
condaorpipto install your Python package. Once the installation finishes, you can directlyimportit in your script. No need to runconda initorconda activate.
Prerequisites
- You must have Lmod module software installed and configured on your system. Currently,
conda-env-modgenerates module files in Lua format only. If you need to use TCL modules or would like to contribute a patch, please contact the maintainers. - Anaconda must be installed as a module. The script assumes that
$CONDA_ENVS_PATHis defined in your Anaconda module and points to a writable directory, otherwiseconda create -n my_envcommand may fail.
User guide for conda-env-mod is provided as a manual page with this repository. You will need to add the share directory to your $MANPATH.
$ export PATH=/path/to/conda-env-mod:$PATH
$ export MANPATH=/path/to/conda-env-mod/share/man:$MANPATH
$ man conda-env-mod
A shortened version of usage instructions can be obtained with --help option.
$ conda-env-mod --help
Several use-cases of conda-env-mod is given in this webpage: Python package installation
Kindly cite usage of this tool by pointing to this repository.
Amiya K. Maji, Lev Gorenstein, and Geoffrey Lentner. "Demystifying Python Package Installation with conda-env-mod." In Proceedings of the 7th Annual Workshop on HPC User Support Tools (HUST 2020), pp. 1-10. 2020.
This code is maintained by Amiya K Maji (amaji@purdue.edu) and Lev Gorenstein (lev@purdue.edu).
© Purdue University, 2020