Skip to content

Instantly share code, notes, and snippets.

@jwsy
Last active December 21, 2015 05:48
Show Gist options
  • Save jwsy/6259192 to your computer and use it in GitHub Desktop.
Save jwsy/6259192 to your computer and use it in GitHub Desktop.
Install IPython, numpy, scipy, pandas, statsmodels, and scikit-learn on OSX 10.8 so I can run the code in LearnDataScience by @nborwankar (http://opendst.org/) Inspired by @westurner
#!/bin/sh
# Adapted from https://gist.github.com/westurner/3196564
# Package versions as of 9/14/2013, assumes that you've installed a virtualenv
setup_brew () {
if [ ! -f "/usr/local/bin/brew" ]; then
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
fi
}
setup_ipython () {
brew install readline
brew install zeromq
pip install ipython pyzmq tornado pygments
#pip install ipython==1.1.0 pyzmq==13.1.0 tornado==3.1.1 pygments==1.6
ipython -c 'from IPython.external import mathjax; mathjax.install_mathjax()'
}
setup_pandas () {
brew install gfortran
brew install pkg-config
brew install freetype
pip install numpy
#pip install numpy==1.8
pip install python-dateutil pytz scipy matplotlib
#pip install python-dateutil==2.1 pytz==2013d scipy==0.12.0 matplotlib==1.3.0
pip install pandas patsy
#pip install pandas==0.12.0 patsy==0.2.1
pip install statsmodels scikit-learn
#pip install statsmodels==0.5.0 scikit-learn==0.14.1
pip install jinja2
#pip install jinja2==2.7.1
}
setup_brew && setup_ipython && setup_pandas && ipython notebook --pylab=inline
@jwsy
Copy link
Author

jwsy commented Mar 3, 2014

If you absolutely must...but I recommend using Continuum's Anaconda distro http://continuum.io/downloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment