This is the long-form version of the Week 0 setup lesson. Same content, more handholding. Skip whichever section doesn't apply.
What "installing Python" actually means
When you "install Python," you're putting a program called python on your machine. That program reads .py files and runs them. You also get pip, a sister program that installs other people's Python code so you can use it.
Both come bundled in the official installer from python.org. That's the path we recommend.
macOS
Apple ships an old Python with macOS, but it's there for the operating system, not for you. Don't try to upgrade it — install a fresh one alongside.
- Visit python.org/downloads.
- Click the big yellow Download Python 3.x button. Run the
.pkginstaller. - Open Terminal (
Cmd + Space, typeterminal). - Type
python3 --version. You should seePython 3.12.xor similar. - Type
pip3 --version. You should see something similar.
Done.
Windows
- Visit python.org/downloads.
- Run the installer. On the first screen, tick "Add python.exe to PATH" at the bottom. This is the single most important checkbox in the whole process.
- Click Install Now.
- Open Command Prompt (Start menu → type
cmd). - Type
python --version.
If you missed the PATH checkbox, the easiest fix is to uninstall and reinstall with the box ticked.
Linux
You probably already have Python 3:
python3 --versionIf not, install through your package manager (sudo apt install python3 python3-pip on Debian/Ubuntu, etc.).
VS Code
Editing .py files in Notepad is not pleasant. Install Visual Studio Code from code.visualstudio.com. On first run, it'll suggest the Python extension by Microsoft — install it.
That's enough. We'll do the rest live.