OS setup - sparklabnyc/resources GitHub Wiki

macOS

This is my setup. If you have a better setup, let me know and edit the wiki.

Basics

  1. Install homebrew for macOS package management
  2. brew install --cask iterm2. Replace terminal with iTerm2 and set as default.
  3. Install oh-my-zsh to improve terminal functionality. Change theme.
  4. brew install git
  5. Install an IDE. I use VSCode for everything because I can have one environment for all programming languages, but other options are available (Posit's RStudio etc). Install using brew.
  6. Install other useful packages and everything else using brew. It avoids clashes and easier to deal with one package manager. If you want to install anything look on brew first. Want a browser? brew install --cask brave-browser. Want any MS application? brew install --cask microsoft-outlook. etc

Python setup

Again, this is my setup. We can use venv if that's your background. But in science and in a lot of universities, conda is the standard. I switch out conda with mamba because conda is very slow.

  1. brew install --cask miniforge . This is a minimal installer for conda. See here and here for more details.
  2. Use virtual environments throughout your analyses. mamba create -n nameofmyenv <list of packages>

R setup

Most people will be using RStudio (I use VSCode with brew install --cask r). That's fine. I would recommend only installing renv into your base distribution, and then using renv for virtual environments for each individual project. This creates a renv.lock file which tells users exactly which version of each package you used for the analysis, making the research more reproducible. For more details, see the renv docs.

SSH setup

Follow these instructions to connect your github with SSH by editing ~/.ssh. Whenever you clone a repo, make sure to use git@github rather than https. Using SSH will avoid having to enter your password every time you push.

Windows

Please update the wiki if you use Windows. Actually, don't use Windows. Or at least use Windows Subsystem for Linux for any analysis.

Linux

Please update the wiki if you use Linux.