Your route · 0 of 17 done
GET SET UPStep 3 of 6About 15 min

Install Python

By the end of this step your computer can run Python programs. (And, if you want it, JavaScript too.)

Showing steps for

Quick check: open a terminal and run:

On Windows

Terminal
python --version

On macOS / Linux

Terminal
python3 --version

If it says Python 3.10 or a higher number, you're done with this step: skip to Node.js (optional) below.

1. Install Python

On Windows

Windows now installs Python through the Python install manager, a small app that downloads and updates Python for you.

  1. Go to python.org/downloads.
  2. Click the big yellow Download button. (Or install Python install manager from the Microsoft Store: same thing.)
  3. Open the file you downloaded and click Install.
  4. Close every terminal window, then open a new one. A terminal only learns about new programs when it starts.
  5. Run:
Terminal
python --version

The first time, the install manager may download Python itself (a minute or two). If it asks whether to add a folder to your PATH, answer y (yes). That lets the terminal find Python's tools from any folder.

On macOS / Linux

  1. Go to python.org/downloads.
  2. Click the big yellow Download Python button. You get a .pkg file.
  3. Open it and click Continue through the screens, then Install. Enter your Mac password when asked.
  4. When it finishes, a Finder window may open with Install Certificates.command in it. Double-click it. (It lets Python download things securely.)
  5. Close your terminal and open a new one. A terminal only learns about new programs when it starts.
  6. Run:
Terminal
python3 --version

On a Mac, the command is python3, not python. You'll see python in some of this course's commands: those run inside a project's own Python, where both names work. Step 5 sets that up.

If it didn’t work

On Windows

python opens the Microsoft Store instead. Windows has a shortcut that hijacks the word python. Press the Windows key, type Manage app execution aliases, open it, and make sure the Python (default) entries are on and the older "App Installer python.exe" entries are off. Then open a new terminal.

"python is not recognized". Close all terminals (including the one in VS Code) and open a fresh one. Still failing? Try py --version. If that works, the install is fine and only the shortcut is missing: use the aliases fix above.

On macOS / Linux

"command not found: python3". Close the terminal fully (Cmd + Q) and open a new one. Still failing? Run the installer again.

A popup asks to install "command line developer tools". Click Install. You need them anyway in the next step.

2. Node.js (optional)

Node.js runs JavaScript outside a browser. You only need it if you want to do Module 0's exercises in JavaScript instead of Python. Skip it otherwise; you can add it any time.

  1. Go to nodejs.org.
  2. Download the version marked LTS (long-term support: the stable one).
  3. Run the installer and accept the defaults.
  4. In a new terminal, run:
Terminal
node --version
Next: Git and GitHub