General Setup
Do everything on this page before Module 1. The course moves fast because this setup is done in advance. If your laptop can’t run Claude Code on the first morning, you lose the whole first lab. Budget 45–90 minutes, more if you’re on Windows. Work from top to bottom. Each step ends with a check that tells you it worked.
1. Operating system
macOS and Linux work natively, with nothing special to do. Windows needs one extra layer: Claude Code runs inside a small Linux system that Windows provides, called WSL2 (Windows Subsystem for Linux), not on native Windows. You set it up once, using the steps right below. Start with this habit: once WSL is installed, do everything on this page (Python, Claude Code, git, your project files) inside the Ubuntu window, never in PowerShell or Command Prompt. The most common Windows problem in the course is mixing the two. A Python installed on the Windows side is invisible inside Ubuntu, and vice versa.
Check (macOS/Linux): you can open a terminal (Terminal.app or your Linux terminal) and echo hello prints hello. Windows users: do the walkthrough below first.
Windows, step by step (WSL2)
Windows users run into more problems than Mac users, and almost all of them come from skipping a step here or working in the wrong window. Go slowly:
- Open PowerShell as administrator. Click Start, type
PowerShell, right-click Windows PowerShell, choose Run as administrator, and click Yes. - Install WSL and Ubuntu. Type
wsl --installand press Enter. It downloads WSL2 and Ubuntu Linux. When it asks, reboot your PC. - Create your Linux login. After the reboot, an Ubuntu window opens on its own (if it doesn’t, open it from Start → Ubuntu) and asks for a username and password. These are new and used only for Linux; they are not your Windows login. The username must be all lowercase with no spaces. Pick a password you’ll remember, because you’ll need it again in step 5 below. Nothing appears on screen as you type the password. That is normal: type it and press Enter.
- Know your window. From here on, wherever this page says “the terminal,” it means this Ubuntu window. Reopen it any time from Start → Ubuntu. Don’t run the course’s commands in PowerShell or Command Prompt — only in Ubuntu.
- Update it once. In the Ubuntu window, run
sudo apt update && sudo apt upgrade -yand enter your Linux password when asked. - Keep your files on the Linux side. Save your project folders under your Linux home (type
cd ~to get there), not in your WindowsC:\Users\...folders. Files kept on the Windows side run much slower and make file paths confusing.
Check (Windows): the Ubuntu window opens and echo hello prints hello. If wsl --install gave an error, the usual causes are that you weren’t in an administrator PowerShell or that virtualization is switched off in your PC’s BIOS. The AI-research-setup guide has a Windows walkthrough with screenshots for both problems.
2. Local runtime: Python (and R or Stata)
Claude Code writes and runs code using whatever is installed on your machine. It does not come with its own Python or R. The course’s examples are in Python. Module 4 shows how to connect to Stata, and R users can follow along with everything. If you’d rather not type installs by hand, do step 3 first, then let Claude Code run this section for you.
- Python 3.10+:
python3 --versionshould print 3.10 or higher. If not: macOSbrew install python; Ubuntu/WSLsudo apt update && sudo apt install python3 python3-pip python3-venv. - Install the packages the labs use:
pip3 install pandas matplotlib duckdb pyarrow requests(add--break-system-packageson newer Ubuntu if pip refuses). - R users: confirm
Rscript --versionruns. Stata users: confirm you can launch Stata from your machine and note the path to the executable. Module 4’s.do/.dtahandoff needs it.
Check: python3 -c "import pandas; print('ok')" prints ok.
3. Claude Code — install and authenticate
You need either a Claude Pro or Max subscription or an API key. Pro (roughly $20/month at the time of writing; check current pricing) is enough for this course. Max tiers give you more usage but are not required. API-key billing charges per token and also works.
Install (pick one method):
# Recommended: the native installer (macOS, Linux, WSL); no Node needed
curl -fsSL https://claude.ai/install.sh | bash
# or Homebrew (macOS)
brew install --cask claude-code
# or npm (requires Node 22 or later)
npm install -g @anthropic-ai/claude-codeThe native installer updates itself automatically. Homebrew and npm installs do not; update them yourself now and then. Anthropic’s setup guide has the current commands for every platform.
Then, from any folder, run claude. On first launch it walks you through login. Choose your subscription account, or set up the API key when prompted. Grant the terminal access it asks for.
Check (the most important one): cd into a fresh empty folder, run claude, and ask it: “Create a file called hello.txt containing one sentence about accounting research, then read it back to me.” If it creates the file and reads it back, and the file is there when you run ls, you are ready for Module 1.
Prefer a window to a bare terminal? Run Claude Code in VS Code or Cursor
The course demos run Claude Code straight from the terminal, which is the fastest way to work once you are used to it. But a blank terminal is intimidating if you have never used one, and you do not have to start there. Claude Code also runs inside a graphical code editor. There you can click on files and see its proposed changes as side-by-side, before-and-after diffs that you accept or reject. It is the same Claude Code on the same account you set up in step 3, in an easier window. You have two options.
Option A — VS Code (free). VS Code is a free, widely used editor from Microsoft.
- Install it from code.visualstudio.com and open it. (Windows/WSL users: see the note at the end of this section.)
- Open the Extensions panel (the four-squares icon in the left bar, or
Ctrl/Cmd+Shift+X), search Claude Code (publisher: Anthropic), and click Install. You need VS Code version 1.94 or newer. - Open your project with File → Open Folder, then open any file inside it.
- Click the ✱ (spark) icon at the top-right of the editor, or the ✱ Claude Code button in the bottom status bar, to open the Claude panel. The first time, click Sign in and approve in the browser with the same Claude account from step 3.
You now have Claude Code in a side panel. It automatically sees whatever code you have selected in the editor (press Alt/Option+K to pin the file and line numbers into your prompt), and you review every edit as a diff before it touches your files. A Plan mode writes out what it intends to do before it does anything.
Option B — Cursor (an editor with AI built in). Cursor is a version of VS Code with its own AI assistant included.
- Download it from cursor.com, install it like any other app, and open it.
- Cursor’s built-in assistant (called Composer) is its own product, separate from Claude Code. The course’s labs and skills assume Claude Code. To run Claude Code in Cursor, install the same Claude Code extension (Extensions panel → search Claude Code by Anthropic), or type
claudein Cursor’s built-in terminal (Terminal → New Terminal). - If the Claude panel ever vanishes after a Cursor update, open the Command Palette (
Ctrl/Cmd+Shift+P) and run Reload Window. This is a known, harmless Cursor issue.
Windows users: install VS Code on the Windows side, then add Microsoft’s WSL extension (Extensions panel → search WSL). Then open your Ubuntu window and type code .. VS Code opens connected into WSL. The editor is a normal Windows window, while Claude Code and your code still run in Linux. This is the easiest setup for a Windows user who is new to the terminal.
Let Claude Code set up the rest for you
Once claude runs, you don’t have to type the remaining setup by hand. You can ask Claude Code to do it, which is the kind of work this course teaches. From a terminal in an empty project folder (or the VS Code / Cursor panel above), try a prompt like:
I’m setting up a laptop for an empirical accounting course. Check whether Python 3.10+, git, and the packages pandas, matplotlib, duckdb, pyarrow, and requests are installed. Install whatever’s missing, then set my git
user.nameanduser.email— ask me for them first. Show me one check per item proving it worked, explain each command before you run it, and stop if anything looks risky.
Claude Code asks permission before it runs anything. Approve the steps one at a time, and expect to type your computer’s password for system installs (on Windows, that’s the Linux password from the WSL walkthrough). This prompt covers step 2 (Python) and the git part of step 4. You still create the GitHub account yourself. You also do WSL (on Windows) and the Claude Code install above yourself, because the agent can’t run until they are in place. The WRDS account in step 5 is also yours: it is an account request, not something installed on your machine. If you prefer to do it all by hand, the exact commands are in steps 2 and 4.
4. git and GitHub
git lets you undo mistakes (Module 1) and share work with collaborators (Module 5). Install: macOS xcode-select --install (or brew install git); Ubuntu/WSL sudo apt install git. Create a free GitHub account if you don’t have one, and set your identity:
git config --global user.name "Your Name"
git config --global user.email "you@university.edu"Check: git --version prints a version; you can log in to github.com.
5. WRDS account and Duo — start this early
Module 4 runs on your own WRDS account. The course never distributes WRDS data or shares logins. If you don’t have an account, request one now through your institution’s WRDS representative. Approval can take days, which is why you request it before the course starts rather than waiting until the week of Module 4.
There are two deadlines. First, your account must exist and Duo multi-factor must be enrolled by Module 1 (WRDS Account → Settings → Two-Factor). Second, by the end of Module 2 you must be able to complete an SSH login: run ssh your_username@wrds-cloud.wharton.upenn.edu, approve the Duo push, see a WRDS prompt, and type exit. The labs use the shorter command ssh wrds. To set it up, add these lines to ~/.ssh/config (create the file if it doesn’t exist), with your own username:
Host wrds
HostName wrds-cloud.wharton.upenn.edu
User your_username
After that, ssh wrds does the same thing as the full command. Module 2 ends with a checkpoint where you submit proof of that login or report a problem. Students without working access by Module 4 use the public-data fallback track, which teaches the same skills with public SEC data. Nobody is left without a way to do the lab, but working on your own WRDS account is better.
Check: the SSH login above succeeds end-to-end.
6. Optional, recommended
Fifteen minutes spent on your terminal setup will help throughout the course. A modern terminal (e.g., Ghostty) and a multiplexer (e.g., Zellij or tmux) make long-running agent sessions much easier to manage. Module 1’s demo shows this setup briefly, but nothing in the course requires it. A code editor helps you read what Claude writes. If a bare terminal feels intimidating, you can run Claude Code inside VS Code or Cursor instead (see step 3).
For a second opinion on any install step, use hanlulong/AI-research-setup. It is a step-by-step Claude Code setup guide written for economics researchers. It covers macOS and Windows and is kept up to date. It is the guide we point students to when a machine gives them trouble. The Tools page covers what Claude Code is relative to Claude Desktop, Cursor, and Codex; the WRDS setup page covers the Module 4 stack in detail (do that one after Module 3, not now).