Skip to content

Instantly share code, notes, and snippets.

@hxu
Last active January 2, 2016 08:39
Show Gist options
  • Save hxu/8277773 to your computer and use it in GitHub Desktop.
Save hxu/8277773 to your computer and use it in GitHub Desktop.
Scientific Python stack on GCE Debian / AWS Ubuntu
sudo apt-get update
# General utilities
sudo apt-get install vim tmux less
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
# Need to edit .bashrc to set up the virtualenv(wrapper) paths:
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
# Make the virtualenv and switch to it
mkvirtualenv foo
# Prerequisites
sudo apt-get install python-dev
sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms1-dev libwebp-dev tcl8.5-dev tk8.5-dev libpng12-dev
sudo apt-get install libatlas-base-dev
# These next packages are a bit iffy. Seems that using the openblas packages can cause segmentation faults on import of the packages
# See http://danielnouri.org/notes/2012/12/19/libblas-and-liblapack-issues-and-speed,-with-scipy-and-ubuntu/
# libopenblas-dev liblapack-dev
# sudo apt-get install gfortran libatlas3-base
# use apt-get to install packages so that dependencies are installed
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
# Now finally the packages for the virtualenv
pip install Pillow ipdb numpy python-dateutil ipython cython
pip install scipy scikit-image scikit-learn pandas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment