wiki:cypress/AnacondaInstallPackage

Version 1 (modified by fuji, 8 years ago) ( diff )

Install Packages to Anaconda Python

'conda' is the command to add packages to Anaconda python distribution. However, since you don't have a permission in /share/apps/anaconda, it won't work. There is a workaround. Here, for example, we want to add 'vtk' python wrapper library.

conda install vtk

But you will see an error message with an instruction for the workaround. Following the instruction, you have to clone the python environment into your home directory by

conda create -n my_root --clone=/share/apps/anaconda/2/2.5.0

'my_root' is the name of environment that you decide. Then,

source activate my_root

Finally, you can install the package,

conda install vtk

In case you encounter "Error: 'conda' can only be installed into the root environment", try

conda remove conda-build
conda remoce conda-env
conda update -all
conda install vtk

From next time, to use Anaconda python with your environment,

module load anaconda
source activate my_root

You have to state above commands in your script when you run python on batch jobs.

Note: See TracWiki for help on using the wiki.