-
-
Save gv0tch0/8899838 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#------------------------------------ | |
# Sets up python data goodness on OSX | |
set -e | |
function setup_brew { | |
echo "INFO: checking for homebrew..." | |
brew help > /dev/null 2>&1 | |
if [[ $? -ne 0 ]]; then | |
echo "INFO: homebrew not found. installing it..." | |
ruby -e "$(curl -fsSL "https://raw.github.com/Homebrew/homebrew/go/install")" | |
else | |
echo "INFO: homebrew was found at '$(which brew)'." | |
fi | |
} | |
function setup_ipython { | |
echo "INFO: setting up ipython..." | |
echo "INFO: installing readline (via brew)..." | |
brew install readline | |
echo "INFO: installing zeromq (via brew)..." | |
brew install zeromq | |
echo "INFO: installing ipython pyzmq tornado pygments (via pip)..." | |
pip install ipython pyzmq tornado pygments | |
} | |
function setup_pandas { | |
echo "INFO: setting up pandas..." | |
echo "INFO: installing gfortran (via brew)..." | |
brew install gfortran | |
echo "INFO: installing pkg-config (via brew)..." | |
brew install pkg-config | |
echo "INFO: installing freetype (via brew)..." | |
brew install freetype | |
echo "INFO: python-dateutil pytz numpy scipy pandas patsy matplotlib statsmodels (via pip)..." | |
pip install python-dateutil pytz numpy scipy pandas patsy matplotlib statsmodels flask | |
} | |
function setup_extras { | |
echo "INFO: installing mathjax (via mathjax)..." | |
python -c 'from IPython.external import mathjax; mathjax.install_mathjax()' | |
} | |
setup_brew && setup_ipython && setup_pandas && setup_extras | |
echo "INFO: starting ipython notebook..." | |
ipython notebook --pylab=inline | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment