Installation Guide for the Course¶
Operating System¶
Most of the materials in this course are platform-independent. The instructions below include steps for all major operating systems: Linux, macOS, and Windows.
Install IDE¶
For your local Integrated Development Environment (IDE), we suggest using Visual Studio Code (VS Code) - a lightweight, open-source editor. Head to the VS Code official website to download and install the version that matches your operating system.
Create a GitHub account¶
Github Copilot¶
We recommend using the AI assistant Github Copilot or other similar tools. As Harvard students, you may apply for a free license of GitHub Copilot by following the steps here. Note that you will need to upload proof of enrollment: you can use a picture of your student ID your GSAS enrollment documentation (which can be found in my.harvard).
To install Github Copilot in VS Code, you can search for Github Copilot
in the VS Code extension marketplace and install it.
We also strongly recommend you to read the VS Code tutorial for Github Copilot. It introduces many useful features of Github Copilot.
Other AI-Copilot resources¶
We also recommend (though not required) to install the following AI-Copilot tools: - Cursor - Windsurf
Install language environments¶
Python¶
We suggest using pyenv to install python for better version management. The installation process varies by operating system:
For macOS:¶
-
Install pyenv:
-
Add pyenv to your shell configuration:
- For bash, add to
~/.bashrc
: - For zsh, add to
~/.zshrc
:
- For bash, add to
For Linux:¶
-
Install pyenv:
-
Add the same configuration as macOS to your
~/.bashrc
or~/.zshrc
For Windows:¶
-
Install pyenv-win using PowerShell (run as Administrator):
-
Add System Environment Variables:
- Open System Properties > Advanced > Environment Variables
- Add to System Variables:
- PYENV:
%USERPROFILE%\.pyenv\pyenv-win
- PYENV_HOME:
%USERPROFILE%\.pyenv\pyenv-win
- PYENV:
- Add to Path:
%USERPROFILE%\.pyenv\pyenv-win\bin
%USERPROFILE%\.pyenv\pyenv-win\shims
For all operating systems, after installation:
-
Install Python:
-
Verify the installation:
Check pip installation¶
Pip is Python's package installer. It usually comes with Python, but it's good to verify the installation:
- Check if pip is installed:
If pip is not installed or you need to upgrade it:
For macOS/Linux:¶
For Windows:¶
After installation, verify pip is working:
Jupyter Notebook¶
The installation process is the same for all operating systems:
-
Install Jupyter using pip:
-
Verify the installation:
-
Launch Jupyter Notebook:
VS Code Python¶
Install the following extensions from VS Code marketplace (same for all operating systems): - Python - Jupyter - Pylance - Pylint
R¶
For macOS:¶
- Download and install R from CRAN
For Linux:¶
For Windows:¶
For all operating systems:
-
Install radian:
-
Install required R packages from R console:
-
Configure VS Code. Please refer to the VS Code R Tutorial for all the steps. We just list the key steps here:
- Install the R extension
- Set radian path in VS Code settings:
- For Windows: Set
r.rterm.windows
to the path of radian (typically%USERPROFILE%\AppData\Local\Programs\Python\Python3x\Scripts\radian.exe
) - For macOS/Linux: Setr.rterm.mac
orr.rterm.linux
to the output ofwhich radian
Optional software¶
Cursor¶
Cursor is available for all operating systems. Download from the official website.
Conda¶
For macOS:¶
- Download the appropriate installer (Apple Silicon or Intel) from Miniconda download page
- Install using the .pkg installer
For Linux:¶
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
For Windows:¶
- Download the Windows installer from Miniconda download page
- Run the .exe installer
- During installation, check "Add Miniconda3 to my PATH environment variable"
For all operating systems, after installation:
-
Initialize conda:
-
Verify installation:
-
Run
conda deactivate
to leave the environment.
For more detailed information, refer to the official Miniconda installation documentation.