Skip to content
  • Home
  • How To
  • M0
  • M1
  • Agents
  • M2
  • M3
  • Module 4 - Deep Learning Foundations
  • M5
  • M6
  • Progress
  • Contact
  • Pricing
  • Sign in
  • Future
  1. Module 4M4
  2. ›
    Setup
  3. ›
    Setup
  1. Module 4
  2. ›
  3. Setup

Module 4 Setup (Check This First)

Module 4 runs on the machine Module 3 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 libraries Modules 2 and 3 installed, NumPy, pandas, openpyxl, matplotlib, seaborn, scikit-learn, SciPy and XGBoost. Like Module 3, this module installs its libraries into (bootcamp), each in the lesson that first uses it, and it keeps teaching on Module 3's dataset until its last section, which downloads a set of images. This page confirms the machine, says which build of PyTorch every lesson was run on and which machines run it, fixes where Module 4's scripts and its dataset live, names the lesson that installs each library, and ends with a checklist that must pass before Lesson 4.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 4 runs on, at the versions every result came from
  • Module 3's dataset, listings.csv, in ~/dev/bootcamp beside your scripts
  • The lesson that installs each of Module 4's two libraries, and what to do if your Mac has an Intel processor

If you are starting here

Module 4 assumes every step of Module 0's setup page and the libraries Modules 2 and 3 install. If you skipped the earlier modules because you already write Python, work in pandas and have fitted scikit-learn models, do that page first, start to finish. Then, in ~/dev/bootcamp with (bootcamp) active, install the five libraries Module 4 runs on beside PyTorch, the four it imports and the SciPy scikit-learn needs, in one line, at the versions every Module 4 result came from:

uv pip install numpy==2.5.2 pandas==3.0.5 python-dateutil==2.9.0.post0 matplotlib==3.11.1 scikit-learn==1.9.1 scipy==1.18.1

uv 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. No Module 4 lesson imports openpyxl, seaborn or XGBoost, so you do not need them here, and the checklist below allows their lines to be missing. Module 0's setup page is free, and the checklist fails without it and without this line.


Where Module 4 runs

Every lesson, lab and capstone in this module runs on your processor, and nothing in the bootcamp needs a graphics card. PyTorch can also run on one, and its default build for Linux and WSL is made for NVIDIA's graphics cards, which is why Lesson 4.1.1 installs the processor-only build from PyTorch's own index instead: read from PyPI and PyTorch's index on 2026-10-25, the default Linux wheel is 555 MB and brings 18 NVIDIA libraries and a GPU compiler beside it that no lesson uses, where the processor-only wheel is 196 MB. Every number in this module was printed by that build, torch==2.14.1+cpu. On a Mac with Apple's chip the same install line fetches the one macOS build, 127 MB, which needs macOS 14 or later and prints its version as 2.14.1.

An Intel Mac is the one machine Module 4 does not run on. PyTorch has published no build for a Mac with an Intel processor since its version 2.3, and the last one that exists, 2.2.2, was built against NumPy 1, so beside (bootcamp)'s numpy 2.5.2 its from_numpy and .numpy(), the two bridges Lesson 4.1.1 teaches, both stop with Numpy is not available. If your Mac has an Intel processor, do Modules 4 to 6 on an Ubuntu machine instead. The simplest is a GitHub Codespace, a development environment GitHub hosts in the cloud, created from an Ubuntu Linux image by default and opened in VS Code in your browser, which every personal GitHub account gets a monthly free quota of, 120 core hours of compute a month on GitHub Free at the time of writing, which the smallest machine, 2 cores, spends at 2 an hour, so 60 hours of work, with usage blocked, never billed, once the quota is used up and no payment method is on file. GitHub's quickstart opens one. The other is Ubuntu in a virtual machine on your Mac, where Module 0's setup page applies as written by its Linux route, Step 1's "If on Linux" and every step after it, and listings.csv, downloaded inside Ubuntu, comes in as the next section shows. In a Codespace the terminal and VS Code are already there, so do Steps 2, 3 and 4 of that page in its terminal, install the Python extension from the Extensions panel, run Step 6's Python: Select Interpreter check, and put listings.csv into ~/dev/bootcamp by uploading it through VS Code's file explorer, because your Mac's Downloads folder is not inside the codespace. A codespace keeps ~/dev/bootcamp across stops and starts, loses it if you rebuild its container, because only /workspaces survives a rebuild, and is deleted after it has sat stopped for 30 days, unpushed work included, so never rebuild it with work inside, and start it at least once a month while Modules 4 to 6 are under way. In either, run the install line under If you are starting here, and from there every command in Modules 4 to 6 is the Linux one.


Where Module 4's files live

Every script a Module 4 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 to 3. A traceback names such a script by its full path, /home/goku/dev/bootcamp/ and the name, and so does a warning PyTorch raises at one of your own lines, which prints that path, the line number and the line itself, 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, and in a Codespace with that machine's home folder, which is not /home/goku. Every chart a lesson saves as a .png file lands beside your scripts, and you open it from VS Code's file explorer.

Sections 4.1 to 4.4 teach on Module 3's dataset, listings.csv, 3,000 property listings in 13 columns, which Module 3's setup page had you save into ~/dev/bootcamp and Lesson 3.1.1 was the first to open. If it is still there, there is nothing to do. If you are starting here, it is provided with the course as a download, and it goes into ~/dev/bootcamp, beside your scripts, because a script opens a bare file name in the folder it runs from. 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/

Section 4.5 teaches on FashionMNIST, a set of small clothing images that Lesson 4.5.1 downloads with torchvision into a folder it names, so there is nothing to fetch for it now. The capstone creates a folder of its own and says so.

DON'T:

  • DON'T leave listings.csv in 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/c boundary that Module 0's setup page calls slow.
  • DON'T edit listings.csv by hand. Its missing values are there on purpose, Lesson 4.1.1 counts them as they travel into a tensor, and one changed cell changes the numbers you compare against.

Installing into (bootcamp)

Module 4 installs the way Modules 2 and 3 did, with uv pip install, (bootcamp) active and an exact version after ==, each library in the lesson that first uses it. Both of its libraries come from PyTorch's own index of processor-only builds, named on the install line with --index-url https://download.pytorch.org/whl/cpu, which Lesson 4.1.1 explains.

Library Version Installed in
PyTorch, tensors, autograd and networks 2.14.1 Lesson 4.1.1
torchvision, image datasets and transforms 0.29.1 Lesson 4.5.1

The same two lines install on WSL, Linux and a Mac with Apple's chip. Where Module 3's XGBoost install differed by system, Module 4's do not.

DON'T:

  • DON'T install PyTorch before Lesson 4.1.1, and never with a bare uv pip install torch. Without the index, uv resolves the default build, which on WSL and Linux is the 555 MB NVIDIA wheel and the 19 GPU packages it brings, and you lose the ModuleNotFoundError Lesson 4.1.1 shows before its install. If a torch line is already in your uv pip list and does not read 2.14.1+cpu on WSL or Linux, or 2.14.1 on a Mac, remove it first with uv pip uninstall torch, which prints a - line with the version it removed, and let Lesson 4.1.1 install the pinned one. A bare 2.14.1 on WSL or Linux is the default build, and the lesson's install line leaves it in place, because torch==2.14.1 is satisfied by either build.

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/activate

Setup checklist (pass ALL of these before Lesson 4.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, on a machine that did every install of Modules 2 and 3 and nothing else:

Package         Version
--------------- -----------
cloudpickle     3.1.2
contourpy       1.4.0
cycler          0.12.1
et-xmlfile      2.0.0
fonttools       4.68.0
joblib          1.6.0
kiwisolver      1.5.1
matplotlib      3.11.1
narwhals        2.28.0
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
scikit-learn    1.9.1
scipy           1.18.1
seaborn         0.13.2
six             1.17.0
threadpoolctl   3.7.0
xgboost-cpu     3.4.1

Your 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 4 runs on must read exactly as shown, numpy 2.5.2, pandas 3.0.5, python-dateutil 2.9.0.post0, matplotlib 3.11.1, scikit-learn 1.9.1 and scipy 1.18.1. openpyxl, seaborn and xgboost-cpu belong to Modules 2 and 3, no Module 4 lesson imports them, their lines may be missing if you started here, and a Mac shows xgboost in place of xgboost-cpu. The other lines are libraries those 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. A torch line should not be there yet, because Lesson 4.1.1 installs it. The one line that may stay reads 2.14.1+cpu on WSL and Linux and 2.14.1 on a Mac, and with it there the lesson's install line prints no + line for it, because it is already there. Any other, a bare 2.14.1 on WSL or Linux included, which is the NVIDIA build, goes first as the DON'T above says. 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 4.1.1 until every line passes.

Your progress
Current streak
🔥 0
Lessons marked today
0 / 3
Longest streak
0

Sign in

The bootcamp

  • Curriculum
  • How To
  • Pricing
  • Changelog
  • Future

The community

  • Discord
  • Reviews
  • Contact

Follow

  • Instagram
  • X
  • TikTok
  • Reddit

Legal

  • Terms
  • Privacy
  • Refunds

Coming soon on November 16, 2026

The AI/ML Newsletter, free.

SubscribeComing soon on December 1, 2026

Confirm by email, unsubscribe in one click.

Theme