Skip to content

Instantly share code, notes, and snippets.

@jrmontag
Created June 30, 2017 17:18
Show Gist options
  • Save jrmontag/8f855b3ddddc509ef11115e5e514fb0e to your computer and use it in GitHub Desktop.
Save jrmontag/8f855b3ddddc509ef11115e5e514fb0e to your computer and use it in GitHub Desktop.
mbp setup (WIP)
#!/usr/bin/env bash
# written by jmontague
# last edit: 2017-03
echo
echo "****************"
echo "*** installing system applications ***"
echo "****************"
# homebrew
echo;echo "* installing homebrew *"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo;echo "* installing apps *"
brew install wget
brew install htop
brew install jq
brew install pstree
brew install macvim
brew install homebrew/science/r
echo;echo "****************"
echo "*** building Python environments ***"
echo "****************"
echo;echo "* installing brewed python 2 + 3 *"
brew install python
# force brewed python to be prioritized
brew link --overwrite python
brew install python3
brew link --overwrite python3
echo;echo "* setting up venv and venvwrapper *"
sudo pip install -U pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
#
# TODO: check if .bash_profile exists, move+rename if so
#
echo "" >> ${HOME}/.bash_profile
echo "# (2017-03) these 3 lines auto-generated by setup script" >> ${HOME}/.bash_profile
echo "# you only need one set of them)" >> ${HOME}/.bash_profile
echo "export WORKON_HOME=$HOME/.virtualenvs" >> ${HOME}/.bash_profile
echo "export PROJECT_HOME=$HOME/Devel" >> ${HOME}/.bash_profile
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ${HOME}/.bash_profile
echo "" >> ${HOME}/.bash_profile
# refresh shell
. $HOME/.bash_profile
echo;echo "* building py2.7 env *"
mkvirtualenv -p $(which python2) python2
pip install -r requirements.txt
deactivate
echo;echo "* building py3.6 env *"
mkvirtualenv -p $(which python3) python3
pip install -r requirements.txt
deactivate
# final steps:
# 2017-03
# python libraries to install programmatically (in any venv)
numpy
scipy
pandas
scikit-learn
statsmodels
nltk
matplotlib
seaborn
jupyter
ujson
requests
gapi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment