Skip to content

Instantly share code, notes, and snippets.

Last active October 13, 2021 22:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Setup a MacBook for Data Science
#!/usr/bin/env sh
# clean macOS setup after installing xcode via xcode-select --install
# install homebrew for package management
/bin/bash -c "$(curl -fsSL"
# make homebrew versions of packages take precedent over path binaries and create .zshrc
echo 'export PATH="/usr/local/bin:/usr/local/sbin:~bin:$PATH"' > .zshrc
# test correct installation of brew
brew doctor
# update index of packages available through homebrew
brew update
#install CLI tools: ex. gnu awk/sed, DS languages, pipenv, RDBs
brew install htop gsed gawk tmux git r python3 pipenv postgresql mysql mariadb julia mactex \
libsvg curl libxml2 gdal geos boost
# install GUI applications via brew cask and x11
brew install --cask slack visual-studio-code docker miniconda rstudio google-chrome zotero xpra \
zoom spotify cyberduck discord vnc-viewer wget xquartz java
# upgrade pip & python setup tools via pip
pip3 install --upgrade pip
pip3 install --upgrade setuptools
# pip install data science stack depends
pip3 install virtualenvwrapper
pip3 install cython
pip3 install nose
# manage the data science stack with pip, since scipy is incomplete via brew
pip3 install numpy scipy matplotlib ipython jupyter pandas sympy nose
#install sklearn with remaining dependencies
pip3 install -U scikit-learn
#install pytorch
pip3 install torch torchvision
#install tensorflow
pip3 install tensorflow
#install cookiecutter data science project management tool
pip3 install cookiecutter
#install new-py
pip3 install new-py
#install rust language
curl --proto '=https' --tlsv1.2 -sSf | sh
# enable autocomplete commands
echo "autoload bashcompinit && bashcompinit" >> .zshrc
Copy link

To run this, download the shell script and then run chmod a+x to enable semi-automated install via ./ I didn't test as sudo, but sudo ./ may be able to run without a password.

Copy link

Added Julia and Rust lang installs

Copy link

added line to append autoload bashcompinit && bashcompinit to .zshrc. need to close terminal or run source .zshrc to init

Copy link

rbartelme commented Jul 28, 2021

added wget install to version 9

Copy link

Added pip3 install for cookiecutter

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