Skip to content

Instantly share code, notes, and snippets.

@kbradnam
Created May 23, 2014 18:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbradnam/5da2b4f9edec2b12c1eb to your computer and use it in GitHub Desktop.
Save kbradnam/5da2b4f9edec2b12c1eb to your computer and use it in GitHub Desktop.
Instructions for installing iPython by use miniconda

These instructions were originally provided by Michelle Gill and lightly adapted for our use.

Running this on lab server with sysadmin account

  1. cd /Volumes/Data/Korflab/Packages/
  2. mkdir Miniconda
  3. cd Miniconda
  4. Download the Python 2 version of Miniconda: curl -O http://repo.continuum.io/miniconda/Miniconda-3.4.2-MacOSX-x86_64.sh
  5. Make executable: chmod +x Miniconda-3.4.2-MacOSX-x86_64.sh
  6. 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?
  7. cd
  8. 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.
  9. 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.
  10. 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.
  11. Control C will stop the server
  12. source deactivate will exit the Python virtual environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment