Setup · a real CPU runtime
Verified baseline
Python 3.12.14, PyTorch 2.9.1+cpu, Linux x86_64, one CPU thread. PyTorch 2.9.1 is a deliberately pinned stable release listed by the official previous-versions page; it is not presented as the newest release. Versioned 2.9 docs anchor API claims. See VALIDATION.md for exact execution evidence.
The official Linux CPU torch wheel was 184,378,187 bytes (about 176 MiB). Additional dependency wheels brought the observed installation downloads to approximately 211 MB; this estimate sums rounded pip log sizes. Final installed environment size was about 863 MiB; see VALIDATION for exact measurement. Allow about 1.5 GB free disk space for installation and temporary files. No GPU packages, torchvision or downloaded model weights are needed. Installation requires internet; all core runs afterward use generated local data only.
Linux: tested environment family
Create an empty environment; activation is unnecessary:
python3.12 -m venv .venv
.venv/bin/python -m pip install -r requirements-cpu.txt
.venv/bin/python -m pip check
.venv/bin/python examples/01_tensors.py
.venv/bin/python -m unittest discover -s tests -v
.venv/bin/python -m dlcourse.run --task all
The authoring environment used the same pinned versions, installed into an isolated temporary environment. The distributed requirements command is verified separately in the validation record. The environment is not in the ZIP. Run commands from the extracted course folder.
Windows PowerShell: written, not executed
With official Python 3.12 installed and available through the py launcher:
py -3.12 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements-cpu.txt
.\.venv\Scripts\python.exe -m pip check
.\.venv\Scripts\python.exe examples\01_tensors.py
.\.venv\Scripts\python.exe -m dlcourse.run --task all
No PowerShell execution-policy change is needed because the interpreter is called directly. Compatible CPU wheels and dependency behavior on your Windows version must still be confirmed; this package has not been executed there.
macOS: written, not executed
Use the official macOS torch wheel; the Linux/Windows +cpu index is not the macOS installation route:
python3.12 -m venv .venv
.venv/bin/python -m pip install -r requirements-macos.txt
.venv/bin/python -m pip check
.venv/bin/python examples/01_tensors.py
.venv/bin/python -m dlcourse.run --task all
The course always creates CPU tensors and does not request Apple's accelerator. Mac wheel availability depends on supported architecture/OS; do not assume an older Intel Mac is supported. macOS pins are proposed counterparts, not a validated environment.
Browser boundary and failures
index.html is a static guide. It does not execute Python, persist grades or provide a GPU. Do not paste shell install commands into a browser Python editor. The existing Aabha Python lab has not been validated for PyTorch and this package does not claim compatibility with it. A hosted notebook may provide torch, but no hosted runtime is required or verified here.
If import torch fails, print the interpreter path and version; installation and execution may be using different environments. Use the full .venv interpreter path consistently. If dlcourse cannot be imported, change directory to the extracted course root and use python -m dlcourse.run. If a dependency has no matching wheel, check Python version and platform rather than installing GPU packages or changing security settings. If training seems slow, verify CPU single-thread settings and begin with the tiny miniloop. Starter NotImplementedError is intentional until you complete the function.
If you cannot install PyTorch, you can still study narrative, diagrams, supplied outputs and hand arithmetic, but you have not completed the runnable PyTorch path. No NumPy simulation is represented as actual PyTorch execution.