Software Setup

Ian McCarthy | Emory University

Software Installation

  1. Download R and/or Python
  2. Download Visual Studio Code
  3. Download Git
  4. Create an account on GitHub
  5. Download GitHub Desktop, authenticate your account, and configure Git for GitHub Desktop

Checklist

  • Do you have the most recent version of R?
version$version.string
[1] "R version 4.4.1 (2024-06-14 ucrt)"
  • What version of Python do you have?
import sys
print(f"Python version: {sys.version}")
Python version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
  • Have you installed the proper extensions in VS Code?
    • GitHub Copilot and GitHub Copilot Chat
    • Python and Jupyter
    • Quarto
    • R and R Extension Pack
  • If using R, have you updated all of your R packages?
update.packages(ask = FALSE, checkBuilt = TRUE, repos='https://cran.us.r-project.org')

Checklist (for Python)

  1. Download Python. During installation, ensure the option Add Python to PATH is checked
  2. Install Python Extension in VS Code
  3. Set Python Interpreter in VS Code (e.g., the version installed in step 1)
    • Open a Python file
    • Click on the Python interpreter selector in the bottom-left corner of the VS Code window (or use Ctrl+Shift+P and search for “Python: Select Interpreter”).
  4. Install python libraries, pip install <library> from terminal

Checklist

  • Which version of Git have you installed?

  • Did you register an account in GitHub?

  • Did you authenticate your account and configure your local Git for GitHub Desktop?

Practice with Git, GitHub, VS Code, and GitHub Desktop

  1. Start a repository on GitHub
  2. Clone repository to your local computer
  3. Create a basic folder structure
  4. Create a ReadMe and a gitignore file in VS Code
  5. Commit changes to git
  6. Push changes to GitHub

Some common mistakes for windows users

  • Windows folders are not files…there is no content without a file. You can’t commit or push changes without content.
  • If you’re working across devices on your own repo, be sure to pull before starting and push afterward.
  • Avoid spaces in file names. Avoid them at all costs. DO NOT PUT SPACES IN YOUR FILE NAMES.

“A space in a file name is a space in your soul.”

Ideal workflow

Until you are a Git(Hub) expert…

  1. Start project on GitHub (fork from another repo if needed)
  2. Clone to local computer with GitHub Desktop
  3. Set up structure and basic files