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.

NoteWhat you need by Module 1 (summary)

A laptop you have admin rights on (macOS or Linux natively; Windows via WSL2). A working local Python, plus R or Stata if that’s your language. Claude Code installed and authenticated on a Claude Pro or Max subscription (or an API key). git installed and a GitHub account. A WRDS account with Duo multi-factor enrolled. You need the account by Module 1 and a working ssh wrds login by the end of Module 2. That login checkpoint is a hard requirement for Module 4.

TipNew to the terminal? Install Claude Desktop first, and let it coach you

Claude Desktop is Anthropic’s app for Mac and Windows (Linux is in beta). It needs no terminal and no configuration, and it is free to download; a Pro or Max plan raises the usage limits. Its Chat tab can’t run commands on your computer, but it can walk you through every step on this page in plain language, for your specific machine. Whenever a step here fails, open Claude Desktop, paste in the command you ran and the error you got (or drag in a screenshot), and ask what to do next. That is the same help Module 1’s lab gives, and you can get it as soon as you’re stuck.

Claude Code (step 3) is the tool that actually runs commands for you. A chat app can only advise you; an agent carries out the steps. Module 1 starts with that difference, and you will see it here before the course begins. The same Desktop app also has a Code tab, which runs Claude Code itself with a graphical interface instead of a terminal. The course demos use the terminal, but everything they teach works in the Code tab too, so use it if the terminal stays uncomfortable.

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:

  1. Open PowerShell as administrator. Click Start, type PowerShell, right-click Windows PowerShell, choose Run as administrator, and click Yes.
  2. Install WSL and Ubuntu. Type wsl --install and press Enter. It downloads WSL2 and Ubuntu Linux. When it asks, reboot your PC.
  3. 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.
  4. 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.
  5. Update it once. In the Ubuntu window, run sudo apt update && sudo apt upgrade -y and enter your Linux password when asked.
  6. Keep your files on the Linux side. Save your project folders under your Linux home (type cd ~ to get there), not in your Windows C:\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 --version should print 3.10 or higher. If not: macOS brew install python; Ubuntu/WSL sudo 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-packages on newer Ubuntu if pip refuses).
  • R users: confirm Rscript --version runs. Stata users: confirm you can launch Stata from your machine and note the path to the executable. Module 4’s .do/.dta handoff 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-code

The 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.

WarningCommon failure: it installs but won’t launch

Check these three causes, in order: (1) the claude command is not on your PATH yet (open a new terminal window; if that doesn’t help, add the path the installer printed); (2) if you installed with npm, Node is too old (node --version should be 22 or later); (3) on Windows, you installed in PowerShell instead of inside WSL, which is where this course runs. If you spend more than 30 minutes here, stop and bring the error message to Module 1’s lab. Part A sets aside time and staff for this. The AI-research-setup guide listed below also has step-by-step walkthroughs for macOS and Windows.

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.

  1. Install it from code.visualstudio.com and open it. (Windows/WSL users: see the note at the end of this section.)
  2. 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.
  3. Open your project with File → Open Folder, then open any file inside it.
  4. 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.

  1. Download it from cursor.com, install it like any other app, and open it.
  2. 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 claude in Cursor’s built-in terminal (Terminal → New Terminal).
  3. 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.
NoteCommon beginner mistakes here
  • The panel and the claude command are two separate installs. The extension runs its own private copy of Claude Code for the side panel. If you also want to type claude in a terminal, you still need the standalone install from step 3.
  • The spark ✱ icon only appears once a file is open, not just a folder. If you don’t see it, open any file, or click ✱ Claude Code in the status bar, which works even with no file open. If it still won’t appear, check Help → About for version 1.94+ and run Developer: Reload Window from the Command Palette.
  • A free Claude.ai account won’t work. Claude Code, in the editor or the terminal, needs a Pro or Max subscription or an API key, the same account as step 3.

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.name and user.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.