Setup
Parts 1–7 and most of 8–10 run on a laptop. The numbers in the book were produced on an Apple Silicon Mac (Apple M5) with Python 3.14 and the exact versions locked in uv.lock (MuJoCo 3.17.0, NumPy 2.5.4, SciPy, PyTorch 2.14, Gymnasium, OpenCV, Matplotlib).
Install
Section titled “Install”The repository is a uv project: pyproject.toml lists the dependencies, uv.lock pins every version, and .python-version pins Python 3.14 (uv downloads it if you don’t have it).
git clone https://github.com/fport/physical-ai-from-scratch.gitcd physical-ai-from-scratchuv syncuv run python experiments/02-timestep/experiment.pyWithout uv: python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt (the file is exported from uv.lock).
The first line of every experiment prints the library versions. With other versions the last digits of some results may differ.
Robot models
Section titled “Robot models”Experiments that use the SO-101, the Franka Panda or the Unitree Go2 load them from MuJoCo Menagerie through experiments/common/menagerie.py, which clones the three model folders once into .cache/mujoco_menagerie at a pinned commit.
Notebooks in notebooks/ install their own dependencies in the first cell. Lessons with run type GPU say which Colab runtime they need.
What a Mac can’t do
Section titled “What a Mac can’t do”Some tools are not available on macOS and are covered from their sources only: Isaac Sim/Lab requires Linux or Windows (requirements); π0 inference needs an NVIDIA GPU with more than 8 GB (openpi).
Read the book as a website
Section titled “Read the book as a website”cd sitenpm installnpm run dev