How to install Python on Windows

To install Python on Windows, python.org now recommends its Python install manager, a small tool that installs Python versions and gives you the python and py commands. The classic installer with the Add python.exe to PATH box still exists for Python 3.15, but it is deprecated and will not be made for 3.16. This guide is for Windows 11 and works the same on Windows 10.

Install manager or classic installer: which to choose

  • Python install manager: the recommended way. It installs any Python version with one command, updates them and keeps several side by side. It comes from python.org, the Microsoft Store or winget, and the three are identical.
  • Classic installer (python-3.15.0-amd64.exe): the familiar wizard, one Python version per run. Fine for 3.15 and older, but no new ones will come after it.

Don’t mix them on one PC without a reason: both register the python and py commands, and it gets hard to tell which one answers.

Install Python with the Python install manager

  1. Open https://www.python.org/downloads/windows/ and click Latest Python install manager. Download the installer from that page and run it.
  2. Open a new Terminal window and install the latest Python. On the first install the manager may offer to add its folder of commands to PATH: answer yes, then commands like pip work from any folder.
py install 3.15 python --version py list

The last command shows every installed version. To update them all:

py install --update

If you install more than one, this runs a specific version:

py -V:3.14

The same install manager with winget:

winget install --id Python.PythonInstallManager -e

Install Python with the classic installer

  1. On the release page on python.org, download Windows installer (64-bit) (or Windows installer (ARM64) for an ARM PC).
  2. In the first window, tick Add python.exe to PATH at the bottom. This is the box people most often miss.
The Python 3.15 installer for Windows with Add python.exe to PATH ticked
  1. Click Install Now. Python goes to your user folder, together with pip and the launcher. No administrator rights are needed.

Open a new Terminal window and check:

python --version python -m pip --version

Install packages with pip in a virtual environment

Keep each project’s packages in its own virtual environment, so projects don’t break each other. In the project folder, create the environment, turn it on and install packages. requests is just an example.

python -m venv .venv .venv\Scripts\Activate.ps1 python -m pip install requests

If PowerShell answers Activate.ps1 cannot be loaded because running scripts is disabled on this system, allow local scripts for your own user. Unsigned scripts from the internet stay blocked:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

To leave the environment, type:

deactivate

How to add Python to PATH by hand

Needed when you installed with the classic installer and forgot the PATH box. Python 3.15 from it lives in %LocalAppData%\Programs\Python\Python315\, and pip’s commands in the Scripts folder inside it. For another version, the number in the folder name changes.

  1. Click Start, type environment variables and open Edit environment variables for your account.
  2. Under User variables for <your name>, select Path and click Edit.
  3. Click New and paste %LocalAppData%\Programs\Python\Python315\. Click New again and paste %LocalAppData%\Programs\Python\Python315\Scripts\.
  4. Click OK in both windows and open a new Terminal window.

If you prefer not to edit PATH yourself, run the installer again, choose Modify and turn on the option that adds Python to the environment variables.

If Python doesn’t start: common errors

  • 'python' is not recognized as an internal or external command, operable program or batch file.: open a new Terminal window first. If it still fails, Python is not in PATH: install it with the install manager or add the folders as described above.
  • Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases., or typing python opens the Microsoft Store: this is a Windows shortcut, not Python. With the classic installer, go to Settings › Apps › Advanced app settings › App execution aliases and turn off the App Installer entries for python.exe and python3.exe. With the install manager, the Python (default) entries must stay on: turn them off and on again to refresh.
  • 'pip' is not recognized: run pip through Python, which always works, for example: python -m pip install requests With the install manager, this creates the pip command again: py install --refresh
  • A newly installed package’s command is “not recognized” with the install manager. This creates shortcuts for new packages: py install --refresh

If you also work on a Mac

MacWashing, System Junk: Xcode junk, user caches, installers and logs found, 22.83 GB ready to be cleaned

System Junk in MacWashing finds the caches of every app it knows, including those hidden inside app data, plus logs, Xcode junk and leftovers of deleted apps. It shows how much each takes and clears them in one go. Anything debatable stays unchecked until you decide.

Free trial · macOS 14 or later

Questions and answers

How do I install Python on Windows?

Install the Python install manager from python.org, then run this in Terminal: py install 3.15 Or use the classic installer and tick Add python.exe to PATH in its first window.

What is the difference between python and py?

python runs the default version. py is the install manager’s command: it runs Python too, and also installs, lists and removes versions.

Can I have several Python versions at once?

Yes. With the install manager, install each version, for example: py install 3.14 Run a specific one like this: py -V:3.14 In a project, create a virtual environment with the version you need, then plain python inside it is that version.