Module 3 Setup (Check This First)
Module 3 runs on the machine Module 2 left: a Unix terminal (WSL on Windows), uv, Python 3.12.8 inside the (bootcamp) environment at ~/dev/bootcamp, VS Code opened on that folder with the Python extension, and in (bootcamp) the five libraries Module 2 installed, NumPy, pandas, openpyxl, matplotlib and seaborn. Like Module 2, this module installs libraries into (bootcamp), each in the lesson that first uses it, and it teaches on a dataset of its own. This page confirms the machine, fixes where Module 3's scripts and its dataset live, names the lesson that installs each library, and ends with a checklist that must pass before Lesson 3.1.1.
By the end of this page you will have:
- Confirmed that
(bootcamp)still answers with Python 3.12.8 and holds the five libraries Module 2 installed - Module 3's dataset,
listings.csv, in~/dev/bootcampbeside your scripts - The lesson that installs each of Module 3's libraries, and the one install that differs by system
If you are starting here
Module 3 assumes every step of Module 0's setup page and the five libraries Module 2 installs. If you skipped the earlier modules because you already write Python and work in pandas, do that page first, start to finish. Then, in ~/dev/bootcamp with (bootcamp) active, install Module 2's five libraries in one line, at the versions every Module 3 result came from:
uv pip install numpy==2.5.2 pandas==3.0.5 python-dateutil==2.9.0.post0 openpyxl==3.1.5 matplotlib==3.11.1 seaborn==0.13.2uv prints a few progress lines and then one + line for each library it added, the six named and the libraries they need. Module 2's setup page explains why the installer is uv pip install and never pip. Module 0's setup page is free, and the checklist below fails without it and without this line.
Where Module 3's files live
Every script a Module 3 lesson asks you to write goes straight into ~/dev/bootcamp, saved under the exact name the lesson gives it, and runs from there with python3 followed by that name, as in Modules 1 and 2. A traceback names such a script by its full path, /home/goku/dev/bootcamp/ and the name, while a file under /home/goku/dev/bootcamp/.venv/lib/python3.12/site-packages/, in a traceback or at the start of a warning, belongs to a library installed into (bootcamp) and is never one of yours. On macOS both paths begin /Users/goku/ instead. Every chart a lesson saves as a .png file lands beside your scripts, and you open it from VS Code's file explorer.
Module 3 teaches on a dataset of its own, listings.csv, provided with the course as a download: 3,000 property listings in 13 columns. It lives in the course's GitHub repository, in data/m3/, where opening the file and pressing its Download raw file button saves it. Lesson 3.1.1 is the first to open it, by that bare name, so it goes into ~/dev/bootcamp, beside your scripts, because a script opens a bare file name in the folder it runs from. Module 3 never opens Module 2's housing files, so none of them is needed here. A browser saves a download into your Downloads folder, so copy or move it from there. On Windows that folder belongs to Windows, and WSL reaches it through /mnt/c, as Lesson 0.1.3 showed:
# Windows, with WSL: for a Windows user named goku
cp /mnt/c/Users/goku/Downloads/listings.csv ~/dev/bootcamp/
# macOS and Linux
mv ~/Downloads/listings.csv ~/dev/bootcamp/The capstone creates a folder of its own and says so.
DON'T:
- DON'T leave
listings.csvin Downloads and point a script at it by its full path. The lessons open it by its bare name, so each script would need that path edited in, and on Windows each read would cross the/mnt/cboundary that Module 0's setup page calls slow. - DON'T edit
listings.csvby hand, not even to fix a value that looks wrong. Its missing values are there on purpose, for the lessons that drop and fill them, and one changed cell changes the numbers you compare against.
Installing into (bootcamp)
Module 3 installs the way Module 2 did, with uv pip install, (bootcamp) active and an exact version after ==, each library in the lesson that first uses it.
| Library | Version | Installed in |
|---|---|---|
| scikit-learn, models, splits and metrics | 1.9.1 | Lesson 3.1.1 |
| SciPy, scientific routines scikit-learn runs on | 1.18.1 | Lesson 3.1.1 |
| XGBoost, gradient boosted trees | 3.4.1 | Lesson 3.5.3 |
XGBoost is the one install that differs by system. On WSL and Linux the package is xgboost-cpu. macOS has no ready-built xgboost-cpu, so a Mac installs the package xgboost, and first libomp (the library XGBoost uses to spread its work across processor cores), which that package needs and does not include. Lesson 3.5.3 gives each system's commands.
DON'T:
- DON'T install scikit-learn, SciPy or XGBoost before the lesson that installs it. Nothing breaks, but you lose the
ModuleNotFoundErrorLesson 3.1.1 shows before its install, and the install command itself is part of what each install lesson teaches.
Every session starts the same way
Open VS Code on ~/dev/bootcamp, open its built-in terminal, and look at the prompt. It must start with (bootcamp). If it does not, activate the environment:
cd ~/dev/bootcamp && source .venv/bin/activateSetup checklist (pass ALL of these before Lesson 3.1.1)
Open a fresh terminal, then run:
cd ~/dev/bootcamp
source .venv/bin/activate
python3 --version # Python 3.12.8
# /home/goku/dev/bootcamp/.venv/bin/python3 (macOS: /Users/goku/dev/bootcamp/.venv/bin/python3)
which python3
uv pip list # the list below
# (3000, 13)
python3 -c "import pandas as pd; print(pd.read_csv('listings.csv').shape)"uv pip list prints:
Package Version
--------------- -----------
contourpy 1.4.0
cycler 0.12.1
et-xmlfile 2.0.0
fonttools 4.68.0
kiwisolver 1.5.1
matplotlib 3.11.1
numpy 2.5.2
openpyxl 3.1.5
packaging 26.3
pandas 3.0.5
pillow 13.0.0
pyparsing 3.3.3
python-dateutil 2.9.0.post0
seaborn 0.13.2
six 1.17.0Your prompt must show (bootcamp) the whole time, and every line of Module 0's setup checklist must still pass as well. In the list, the six libraries Module 2 installed must read exactly as shown, numpy 2.5.2, pandas 3.0.5, python-dateutil 2.9.0.post0, openpyxl 3.1.5, matplotlib 3.11.1 and seaborn 0.13.2. The other lines are libraries those six need, installed with them and never pinned, so their versions, and which of them appear, can differ on your machine. A library neither kind accounts for was installed along the way: the lessons still run, though a library no lesson installs can change what they print, as Lesson 2.5.2 shows for pyarrow, and Lesson 3.1.1's install line prints no + line for a library it names that is already there at that version, and replaces one there at another version, printing a - line for the old version above the + line for the new. If the last line raises FileNotFoundError, listings.csv is not in ~/dev/bootcamp under exactly that name. If any other line fails, Module 0's setup page, or the install line under If you are starting here, is where it gets fixed. Do not start Lesson 3.1.1 until every line passes.