Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install the Python scientific stack (a.k.a. the Scipy Superpack) via Brew and pip
hash brew &> /dev/null
if [ $? -eq 1 ]; then
echo 'Installing Homebrew ...'
ruby -e "$(curl -fsSL"
# Ensure Homebrew formulae are updated
brew update
hash git &> /dev/null
if [ $? -eq 1 ]; then
echo 'Installing Git ...'
brew install git
hash gcc &> /dev/null
if [ $? -eq 1 ]; then
echo 'No gcc detected; Installing XCode Command Line Tools ...'
xcode-select --install
# Add science tap
brew tap homebrew/science
# Python tools and utilities
brew install python
brew install gfortran
pip install nose
pip install six
pip install patsy
pip install pygments
pip install sphinx
pip install cython
# IPython
brew install zeromq
pip install jinja2
pip install tornado
pip install pyzmq
pip install ipython
# OpenBLAS for NumPy/SciPy
brew install openblas
export BLAS=/usr/local/opt/openblas/lib/libopenblas.a
export LAPACK=/usr/local/opt/openblas/lib/libopenblas.a
# Build from cloned repo to avoid SciPy build issue
git clone numpy_temp
cd numpy_temp
python bdist_egg
easy_install dist/*egg
cd ..
rm -rf numpy_temp
# SciPy
pip install git+git://
# Matplotlib
brew install freetype
pip install git+git://
# Rest of the stack
pip install git+git://
pip install git+git://
pip install git+git://
pip install git+git://
pip install git+git://
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment