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: Choose Your OS
Select your OS once, then stay in that tab for the language setup so you only see one platform path.
Official docs:
Install VS Code
- 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 --versionStep 2: Choose One Language Path
Pick one language to start. You can install the other one later.
Official docs:
Install Python + VS Code support
- Install the latest stable Python 3 from python.org
- Open a new terminal and check:
py --versionIf py is not available, try:
python --version- Open VS Code
- Open Extensions (
Ctrl+Shift+X) - Install Python (publisher: Microsoft)
- Run Command Palette and select:
Python: Select Interpreter - Choose your installed Python interpreter
Test Python
Create hello.py:
print("Hello from Python in VS Code")Run it with the play button (“Run Python File”) or terminal.
Official docs:
Install R + VS Code support
- Install R from cloud.r-project.org
- During install, keep defaults (recommended: let installer store version info in registry)
- Open a new terminal and check:
R --version- In VS Code Extensions, install R (publisher: REditorSupport)
- Install
languageserverin R:
install.packages("languageserver")This package enables IntelliSense-style features in VS Code (autocomplete, diagnostics, and hover help).
- In VS Code, open Command Palette and run:
R: Create R terminal
Test R
Create hello.R:
x <- 2 + 2
print(x)Run with Ctrl+Enter in an R terminal.
Install VS Code
- Download VS Code from code.visualstudio.com
- Open the
.dmg - Drag Visual Studio Code.app into Applications
- Open VS Code, and open Command Palette (
Cmd+Shift+P) to run:Shell Command: Install 'code' command in PATH
- Open a terminal in VS Code
Quick check:
code --versionStep 2: Choose One Language Path
Pick one language to start. You can install the other one later.
Official docs:
Install Python + VS Code support
- Install the latest stable Python 3 from python.org
- Open a new terminal and check:
python3 --versionIf you are on macOS, you may be prompted to install Xcode Command Line Tools when running Python or opening a terminal for the first time. Follow the prompts to install if needed.
- Open VS Code
- Open Extensions (
Cmd+Shift+X) - Install Python (publisher: Microsoft)
- Run Command Palette and select:
Python: Select Interpreter - Choose your installed Python interpreter
Test Python
Create hello.py:
print("Hello from Python in VS Code")Run it with the play button (“Run Python File”) or terminal.
Official docs:
Install R + VS Code support
- Install R from cloud.r-project.org
- Open a new terminal and check:
R --version- In VS Code Extensions, install R (publisher: REditorSupport)
- Install
languageserverin R:
install.packages("languageserver")This package enables IntelliSense-style features in VS Code (autocomplete, diagnostics, and hover help).
- In VS Code, open Command Palette and run:
R: Create R terminal
Test R
Create hello.R:
x <- 2 + 2
print(x)Run with Cmd+Enter in an R terminal.
Step 2: 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 not found (Windows)
You might need to add the R.exe location such as ‘C:Files.3’ to ‘PATH’
Start → search “Environment Variables” → “Edit the system environment variables”,
Environment Variables…
Under your user (or System) variables: Path → Edit → New
Paste the ...\bin path → OK → reopen cmd
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