These instructions were originally provided by Michelle Gill and lightly adapted for our use.
Running this on lab server with sysadmin account
cd /Volumes/Data/Korflab/Packages/
mkdir Miniconda
cd Miniconda
- Download the Python 2 version of Miniconda:
curl -O http://repo.continuum.io/miniconda/Miniconda-3.4.2-MacOSX-x86_64.sh
- Make executable:
chmod +x Miniconda-3.4.2-MacOSX-x86_64.sh
- Run script:
sudo ./chmod +x Miniconda-3.4.2-MacOSX-x86_64.sh
6.1. Choose/opt/Miniconda
as the install directory 6.2. Choose to add PATH to .bash_profile 6.3. Running this as sudo means that if .bash_profile didn't exist, it will now be owned by root, so maybe use chown to change ownership back to sysadmin account user or just modify PATH from .profile? cd
- Create a conda environment using:
conda create -n mypython numpy matplotlib scipy ipython-notebook
8.1. Allow it to install the required libraries. 8.2 This will create a (virtual?) Python environment (in ~/envs/) called mypython and will install numpy, matplotlib, scipy, and ipython with the notebook. - Activate the python environment in a terminal using
source activate mypython
. 9.1 The environment is only active in this terminal window, so all subsequent commands must be performed in it. 9.2 The prompt will change to indicate which conda environment has been selected. - Start the ipython notebook in the default web browser using the command:
ipython notebook
from the command line where the new python environment is selected. - Control C will stop the server
source deactivate
will exit the Python virtual environment