VS Code + Python or R + GitHub Copilot Setup
Student setup guide for Windows and macOS
Overview
This guide helps you set up:
- Visual Studio Code
- Either Python or R in VS Code
- GitHub Copilot in VS Code
Estimated time: 20-40 minutes.
This setup uses several terminal commands (for checks like code --version, python --version, and R --version). If you are new to terminals, read Terminal Basics first.
Before You Start
- A stable internet connection
- A GitHub account (create one at github.com if needed)
- Permission to install software on your computer
Step 1: Install VS Code
Official docs:
- Download VS Code from code.visualstudio.com
- Run
VSCodeUserSetup-{version}.exe - Keep the default User setup install unless you specifically need system-wide install
- Reopen terminal after install
Quick check:
code --version- Download VS Code from code.visualstudio.com
- Open the
.dmg - Drag Visual Studio Code.app into Applications
- In VS Code, open Command Palette (
Cmd+Shift+P) and run:Shell Command: Install 'code' command in PATH
- Restart terminal
Quick check:
code --versionStep 2: Choose One Language Path
You only need one path to start:
- Option A: Python
- Option B: R
You can install the other one later.
Option A: Python in VS Code
Official docs:
A1. Install Python
- Install the latest stable Python 3 from python.org
- Open a new terminal
Check:
py --versionIf py is not available, try:
python --versionA2. Install Python extension in VS Code
- Open VS Code
- Open Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Install Python (publisher: Microsoft)
- Run Command Palette and select:
Python: Select Interpreter - Choose your installed Python interpreter
A3. Test Python
Create hello.py:
print("Hello from Python in VS Code")Run it with the play button (“Run Python File”) or terminal.
Option B: R in VS Code
Official docs:
B1. Install R
- Install R from cloud.r-project.org
- During install, keep defaults (recommended: let installer store version info in registry)
- Open a new terminal
Check:
R --versionB2. Install R support in VS Code
- In VS Code Extensions, install R (publisher: REditorSupport)
- Install
languageserverin R:
install.packages("languageserver")- In VS Code, open Command Palette and run:
R: Create R terminal
B3. Test R
Create hello.R:
x <- 2 + 2
print(x)Run with Ctrl+Enter (Windows) or Cmd+Enter (macOS) in an R terminal.
Step 3: Set Up GitHub Copilot in VS Code
Official docs:
- Open VS Code
- In the status bar, click the Copilot icon and choose Use AI Features
- Sign in to GitHub when prompted
- If you do not already have a plan, you can start with Copilot Free
- Open a code file and verify Copilot is active (chat panel opens and/or inline suggestions appear)
Student note
If you are a verified student, apply for the free student Copilot Pro plan (“student plus” upgrade).
Quick quota diff (checked February 17, 2026):
- Copilot Free: 2,000 code completions/month, 50 chat messages/month, and 50 premium requests/month
- Student plan (Copilot Pro at $0): unlimited code completions, unlimited chat interactions in IDE/CLI/mobile, and 300 premium requests/month
If you are eligible, this is a large jump in included usage, so it is worth applying early.
Quick Troubleshooting
code command not found
- Windows: close and reopen terminal after install
- macOS: run
Shell Command: Install 'code' command in PATHfrom Command Palette, then restart terminal
Python interpreter not found in VS Code
- Run
Python: Select Interpreter - If nothing appears, reinstall Python and restart VS Code
R extension works but no IntelliSense
Install in R:
install.packages("languageserver")Then restart VS Code.
Copilot sign-in issues
- In VS Code, use Accounts menu to sign out/in GitHub
- Check your Copilot plan at github.com/settings/copilot