Local Anaconda Installation

For researchers who have Python package requirements beyond the most common packages (Numpy, Scipy, Pandas), we recommend installing Anaconda for yourself in your home directory. This will allow you to add additional packages as needed and have greater control over your environment.

Install Anaconda into Your Home Directory

Select the python version you will be needing, either 2.7 or 3. Note that many codes are not compatible with both environments.

Python 2.7

# install Anaconda
wget https://repo.continuum.io/archive/Anaconda2-4.4.0-Linux-x86_64.sh
bash Anaconda2-4.4.0-Linux-x86_64.sh -p $HOME/anaconda2
# Next line makes anaconda your default python, comment out with # to disable this >> ~/.bashrc
echo 'export PATH="$HOME/anaconda2/bin:$PATH"' >> ~/.bashrc
rm Anaconda2-4.4.0-Linux-x86_64.sh
source ~/.bashrc

Python 3

# install Anaconda
wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
bash Anaconda3-4.4.0-Linux-x86_64.sh -p $HOME/anaconda3
echo "# Next line makes anaconda my default python, comment out with # to disable this" >> ~/.bashrc
echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> ~/.bashrc
rm Anaconda3-4.4.0-Linux-x86_64.sh
source ~/.bashrc

Setup Your Environment

Setup a conda environment for your project or workflow and then install the necessary packages into the environment. You might want multiple environments if you have packages that have conflicting prerequisites. If so, just rerun the following to setup each environment as you need them (you will not need to reinstall Anaconda).

# create conda environment for your project (fill in <your_project>)
conda create -y -n <your_project>
source activate <your_project>

# install packages 
conda install -y <package_name>
# or, if not available in conda
pip install <package_name>

To Work

Now, to re-enter your environment, you just need the following:

source activate <your_project>