Last active
January 30, 2024 20:02
-
-
Save rbartelme/328bdad9fc049cd9ceb0766974c560cd to your computer and use it in GitHub Desktop.
Setup a MacBook for Data Science
This file contains 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 sh | |
# clean macOS setup after installing xcode via xcode-select --install | |
# install homebrew for package management | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# 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 https://sh.rustup.rs | sh | |
# enable autocomplete commands | |
echo "autoload bashcompinit && bashcompinit" >> .zshrc |
Added Julia and Rust lang installs
added line to append autoload bashcompinit && bashcompinit
to .zshrc
. need to close terminal or run source .zshrc
to init
added wget install to version 9
Added pip3
install for cookiecutter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run this, download the shell script
ds_macup.sh
and then runchmod a+x ds_macup.sh
to enable semi-automated install via./ds_macup.sh
. I didn't test assudo
, butsudo ./ds_macup.sh
may be able to run without a password.