How do I set up my Python environment on gstar

Q&ACategory: SoftwareHow do I set up my Python environment on gstar
Ewan Barr asked 2 years ago

What is the easiest way to get a python environment up and running on gSTAR? 

1 Answers
Ewan Barr answered 2 years ago

Assuming you are starting from scratch, the best way is to used the anaconda distribution already installed on gSTAR. This can be loaded using the `module` command:        
module load anaconda/x86_64/2.2.0
This will give you access to the base level anaconda distribution. If you want to download new libraries, it is a good idea to create your own personal python environment. To do this, we will first clone the base anaconda distribution:
conda create -n my_root --clone=/usr/local/x86_64/anaconda-2.2.0
Where “my_root” is the name you would like to give your new python environment. To activate the new environment use:    
source activate my_root
Note: this is only currently possible from the bash shell. With your environment now activated, installing new packages is as easy as: \
conda install <name of package>  

Posted in