The Local Toolchain
Python, Node, git, and a real editor on your own machine
Appendix A — The Local Toolchain
“For which of you, desiring to build a tower, does not first sit down and count the cost?” — Luke 14:28 (ESV)
In Coding 1 and 2 you lived in OnlineGDB. The browser compiled your code, ran it, and handed you a share link. That was the right tool for learning the language. It is the wrong tool for building a system. Real servers, databases, and front ends run on a real machine, talk to each other over real ports, and ship as a real git repository. So this is the week you set up a real toolchain.
This is a get-it-working guide, not a tour. The goal is a machine that can run Python, run Node, track code in git, push to GitHub, and edit all of it in a real editor — in about 45 minutes. We are not teaching you everything about these tools. We are getting you to a green checkmark on the final checklist.
You need five things:
- Python 3 (3.11 or newer) — the language of Phase 1 and of FastAPI.
- Node.js (an LTS release) — the runtime for your first server.
- git — version control, and the way you’ll submit every Phase 2 project.
- A real editor — VS Code recommended.
- A terminal — already on your machine; you’ll use it constantly.
Pick your OS in each section and follow the steps. Every install ends with a “verify it worked” command. Don’t skip it.
Coach’s Note — From here on, the terminal is the gym. You will type
python3,node,git, andpsqlhundreds of times. If the terminal still feels foreign, that’s the gap — and it closes fast with reps. Open it now and leave it open.
A.1 — Install Python 3
You want Python 3.11 or newer. Anything older is missing features we rely on. macOS often ships with an ancient Python — install a current one rather than fighting the system copy.
macOS
The cleanest path is Homebrew, the de-facto macOS package manager. Install Homebrew first if you don’t have it (paste the one-liner from brew.sh into Terminal), then:
brew install python@3.12
Windows
Download the installer from python.org/downloads. Run it, and check the box that says “Add python.exe to PATH” on the first screen. That one checkbox prevents 90% of “command not found” pain. Finish the install.
(Alternatively, from a terminal: winget install Python.Python.3.12.)
Linux
Most distros have a recent Python already, but install the venv and pip packages explicitly:
Ubuntu / Debian:
sudo apt update
sudo apt install -y python3 python3-venv python3-pip
Fedora: sudo dnf install -y python3 python3-pip
Arch: sudo pacman -S python python-pip
Verify it worked
python3 --version
You should see Python 3.11.x or higher (on Windows the command may be python --version). Then confirm pip, Python’s package installer:
python3 -m pip --version
If both print versions, Python is installed.
A.1.1 — Virtual environments (do this for every project)
Here is the single most important Python habit. Never install project packages into your system Python. Different projects need different versions of the same library, and mixing them globally is how you get a machine where nothing works and you don’t know why.
The fix is a virtual environment (venv): a private, throwaway folder of packages that belongs to one project. Activate it, and pip install drops packages into that folder instead of polluting your whole system. Delete the folder and the project’s dependencies are gone clean.
Create one inside your project folder:
python3 -m venv .venv
That makes a .venv/ directory. Now activate it:
- macOS / Linux:
source .venv/bin/activate - Windows (PowerShell):
.\.venv\Scripts\Activate.ps1 - Windows (Command Prompt):
.\.venv\Scripts\activate.bat
Your prompt changes to show (.venv). From now on, python and pip mean this project’s copies. Install something:
pip install requests
When you’re done working, deactivate returns you to the system Python.
Coach’s Note — Add
.venv/to your.gitignore. You commit your list of dependencies (arequirements.txt, made withpip freeze > requirements.txt), never the installed packages themselves. Anyone who clones your repo recreates the venv from that list. This is the same discipline you’ll see again withnode_modules/.
A.2 — Install Node.js
Node.js runs JavaScript outside the browser. It’s the runtime for your first server (Week 9). Install an LTS (Long-Term Support) release — currently the v20 or v22 line. Don’t install “Current”; LTS is the boring, stable choice, and boring is correct for infrastructure.
The recommended way to install Node is a version manager — nvm on macOS/Linux, nvm-windows on Windows — because it lets you switch Node versions per project without administrator pain. If you just want it working fast, the official installer is fine too.
macOS / Linux (recommended: nvm)
Install nvm by pasting the install command from the nvm README, then open a new terminal (nvm needs a fresh shell), and:
nvm install --lts
nvm use --lts
Prefer Homebrew on mac? brew install node works too — you just give up easy version switching.
Windows
Install nvm-windows (download nvm-setup.exe), then in a new terminal:
nvm install lts
nvm use lts
Or skip nvm and grab the LTS installer from nodejs.org. Or winget install OpenJS.NodeJS.LTS.
Verify it worked
node --version
npm --version
You should see something like v22.x.x for Node and 10.x.x for npm (npm — the Node package manager — comes bundled with Node). If both print, you’re set.
Coach’s Note —
npmis to Node whatpipis to Python. Andnode_modules/is to npm what.venv/is to Python — a big folder of installed dependencies that you never commit. Addnode_modules/to.gitignore; commitpackage.json(your dependency list) instead. Same discipline, two ecosystems.
A.3 — Install git
git is the version-control system the entire software world runs on, and — new for Coding 3 — the way you submit every Phase 2 project. No more share links. You push your code to a public GitHub repository and submit the URL.
macOS
You likely already have it (it ships with the Xcode Command Line Tools). If git --version fails, run xcode-select --install, or brew install git.
Windows
Download Git for Windows and run the installer. The defaults are fine — accept them. This also gives you Git Bash, a Unix-style terminal that makes the rest of this course smoother. (Or winget install Git.Git.)
Linux
Ubuntu / Debian: sudo apt install -y git
Fedora: sudo dnf install -y git
Arch: sudo pacman -S git
Verify it worked
git --version
You should see git version 2.x.x.
A.3.1 — One-time configuration
git stamps your name and email on every commit. Set them once, globally:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Use the same email as your GitHub account so your commits link to your profile. Set a sane default branch name while you’re here:
git config --global init.defaultBranch main
A.3.2 — Create a repo and push it (the submission workflow)
This is the loop you’ll run for every Phase 2 project. Practice it once now so it’s muscle memory.
1. Make a project folder and a first file:
mkdir my-first-repo
cd my-first-repo
Create a README.txt with one line in it (use your editor — A.4) and a .gitignore (a plain text file listing things git should ignore, one per line, e.g. .venv/ and node_modules/).
2. Turn the folder into a git repo and make your first commit:
git init
git add .
git commit -m "Initial commit"
git add . stages everything; git commit records a snapshot with a message.
3. Create the GitHub repo. On github.com, click New repository, name it, leave it empty (no README — you already have one), and Public. GitHub shows you the repo’s URL, something like https://github.com/yourname/my-first-repo.git.
4. Connect your local repo to GitHub and push:
git remote add origin https://github.com/yourname/my-first-repo.git
git branch -M main
git push -u origin main
The first push will ask you to authenticate. The smoothest path is the GitHub CLI (gh auth login) or a Personal Access Token — GitHub’s screens walk you through it. After this, your day-to-day loop is just three lines:
git add .
git commit -m "what I changed"
git push
Coach’s Note — A commit message is a promise to your future self. “fixed stuff” tells you nothing in three weeks. “Add user lookup endpoint; fix off-by-one in pagination” tells you everything. Write them like you’ll read them — because you will.
A.4 — Install a real editor
We recommend Visual Studio Code (VS Code) — free, fast, and the most widely used editor in the industry, with first-class support for everything in this course. Alternatives are fine if you already love one: PyCharm (heavier, Python-focused), Neovim or Sublime Text (lighter, steeper), or WebStorm for the JS side. The course assumes VS Code in screenshots and extension names, but nothing depends on it.
Install
Download from code.visualstudio.com and install like any other app. On Linux, your package manager or the .deb/.rpm from that page works. Open it once to confirm it launches.
Useful extensions
Open the Extensions panel (the squares icon in the sidebar, or Ctrl+Shift+X / Cmd+Shift+X) and install:
- Python (by Microsoft) — IntelliSense, debugging, and venv detection. When you open a project, VS Code will offer to use its
.venv— say yes. - Pylance — fast type-aware Python language support (usually installed with the Python extension).
- ESLint and Prettier — JavaScript/TypeScript linting and auto-formatting for your Node work. Prettier formats on save; ESLint flags mistakes.
- An agentic-AI extension — the agent you’ll direct all through Phase 2. We deliberately don’t name one product here; see Appendix C for what “agentic” means, how to set one up, and the human-in-the-loop rules you must follow.
- (Windows + WSL users) WSL — lets VS Code edit files inside your Linux environment seamlessly.
Coach’s Note — Turn on Format on Save (Settings → search “format on save”) and let Prettier/Black handle whitespace forever. Arguing with yourself about indentation is wasted energy. Let the machine do it and spend your attention on the architecture.
A.5 — Verify Your Whole Toolchain
Everyone does this last step, regardless of OS. It proves the pieces work together. Open a terminal and run each line. Each should print a version, not an error.
python3 --version # Python 3.11+ (or: python --version on Windows)
python3 -m pip --version
node --version # v20+ or v22+
npm --version
git --version
code --version # VS Code; if missing, that's fine — open it manually
Now run the real integration test — a tiny project that exercises Python, a venv, git, and GitHub end to end:
mkdir toolchain-check
cd toolchain-check
python3 -m venv .venv
Activate the venv (see A.1.1 for your OS), then:
pip install requests
python3 -c "import requests; print('python + venv OK')"
You should see python + venv OK. Now make it a repo and push it:
git init
printf ".venv/\n__pycache__/\n" > .gitignore
git add .
git commit -m "Toolchain verification project"
Create an empty public repo on GitHub named toolchain-check, then:
git remote add origin https://github.com/yourname/toolchain-check.git
git branch -M main
git push -u origin main
Refresh the repo page on GitHub. If your .gitignore is there and .venv/ is not (because you ignored it correctly), every piece of your toolchain just worked together. You’re ready for Week 1.
When Things Go Wrong
python3: command not found— On Windows the command is oftenpython. On macOS/Linux, your PATH may not include the new install; open a fresh terminal, or reinstall and confirm PATH.pip installfails with “externally-managed-environment” — You’re trying to install into the system Python. That’s exactly what venvs prevent. Create and activate a.venvfirst (A.1.1), thenpip install.node: command not foundright after installing nvm — nvm only affects new shells. Close the terminal and open a fresh one, thennvm use --lts.git pushrejected / asks endlessly for a password — GitHub no longer accepts account passwords over HTTPS. Usegh auth login(GitHub CLI) or a Personal Access Token as the password.- VS Code can’t find your interpreter — Open the Command Palette (
Ctrl/Cmd+Shift+P), run “Python: Select Interpreter,” and pick the one inside.venv. - Stuck more than 20 minutes — Ask a peer, your instructor, or your AI. Setting up a toolchain is a setup task, not a learning task. There’s no merit badge for suffering through it alone.
Up next: Appendix B — Databases Locally, where you’ll get SQLite, PostgreSQL, and MongoDB running on this same machine. Then head to Chapter 1. See you in the gym.