How to Install Python on Windows
To install Python on Windows, download the installer from python.org, and tick "Add python.exe to PATH" on the first screen before clicking Install Now. That single checkbox is the difference between python working in a terminal and Windows opening the Microsoft Store instead.
Then verify it with py --version rather than python --version. The py launcher is the part of Windows Python that beginners are never told about, and it solves most of the problems they run into later.
Installing Python on Windows is genuinely easy, and the official installer does the right thing. Almost every problem people hit afterwards comes from one of three things: the PATH checkbox, the Microsoft Store stub, or having more than one Python installed without realising it. This guide covers the install in about two minutes and then spends the rest of its time on those three.
Step 1: download the installer
Go to python.org/downloads. The site detects Windows and offers the current 64-bit installer on the main button — that is the one you want.
Do not install Python from the Microsoft Store unless you have a specific reason. It works for simple scripts, but it sandboxes file access in ways that confuse beginners, and it interacts badly with the app-execution-alias problem described below.
Step 2: tick the PATH box
The first installer screen has two checkboxes at the bottom. The important one is "Add python.exe to PATH". It is unticked by default, and it is the single most consequential click in this whole process.
PATH is the list of folders Windows searches when you type a command. If Python is not on it, typing python in a terminal does not find your installation — Windows falls through to a stub that opens the Microsoft Store.
Also tick "Use admin privileges when installing py.exe" if offered. Then click Install Now, which uses sensible defaults and includes pip, the package installer, and IDLE, a basic editor.
If you have already installed Python without ticking the box, do not reinstall from scratch. Re-run the installer, choose Modify, and you can add PATH there.
Step 3: verify it worked
Open a new terminal — PowerShell or Windows Terminal. An already-open window keeps the old PATH, which is why "I installed it and it still doesn't work" is usually solved by closing and reopening the terminal.
If Windows itself is sluggish enough that the installer crawls, that is a separate problem — our guide to speeding up Windows 11 covers it.
py --version
On the machine used to write this, that prints:
Python 3.14.3
Then check pip:
py -m pip --version
pip 26.2.1 from C:\Users\<you>\AppData\Roaming\Python\Python314\site-packages\pip (python 3.14)
If both print a version, you are done installing. The rest of this guide is about the things that go wrong afterwards.
Why py and not python?
Windows ships a Python launcher called py, installed to C:\Windows\py.exe. It is not a different Python — it is a small program that finds the Python installations on your machine and runs the one you asked for.
This matters more than it sounds. py lives in a folder that is always on PATH, so it works whether or not you ticked the checkbox. And when you eventually have more than one version installed, py is how you choose between them.
py --list
On the machine used here, that prints two:
-V:3.14 * Python 3.14 (64-bit)
-V:3.12 Python 3.12
The asterisk marks the default. To run a specific one:
py -3.12 --version
py -3.12 -m pip install requests
That is the cleanest way to handle multiple versions on Windows, and it avoids the PATH-ordering games that cause most "wrong Python" problems.
The Microsoft Store stub problem
This is the single most common Windows-specific Python complaint, and it looks baffling the first time.
You type python, and instead of a Python prompt, the Microsoft Store opens on the Python page. Or you get:
Python was not found; run without arguments to install from the Microsoft Store...
Windows ships stub executables called app execution aliases for python.exe and python3.exe. They exist to help people who have no Python at all. If your real Python is not on PATH, or is later in PATH than the stub, Windows runs the stub instead.
To fix it, go to Settings > Apps > Advanced app settings > App execution aliases and switch off the entries for python.exe and python3.exe.
You can confirm which executable you are actually getting:
Get-Command python | Select-Object -ExpandProperty Source
A correct install prints a real path such as C:\Python314\python.exe. If it prints something containing WindowsApps, you are hitting the stub.
Virtual environments: do this before installing packages
The step tutorials skip, and the reason beginners' machines end up in a mess. A virtual environment is a private folder of packages for one project, so two projects can use different versions of the same library without fighting.
From inside your project folder:
py -m venv .venv
.venv\Scripts\Activate.ps1
Your prompt gains a (.venv) prefix. Now pip install puts packages in that folder rather than system-wide:
pip install requests
pip freeze > requirements.txt
Type deactivate to leave it.
If PowerShell refuses with an execution-policy error, allow local scripts for your user only:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
That permits scripts you wrote locally while still requiring downloaded scripts to be signed. The venv documentation covers the details.
Common problems and what causes them
| Symptom | Cause | Fix |
|---|---|---|
Microsoft Store opens when you type python | App execution alias stub | Turn off the aliases; use py |
'python' is not recognized | Not on PATH | Re-run installer > Modify > add to PATH, or use py |
| Works in a new terminal, not the old one | Old window has the old PATH | Close and reopen the terminal |
pip is not recognized | Scripts folder not on PATH | Use py -m pip instead of bare pip |
| Package installed but import fails | Installed into a different Python | Use py -m pip install, or activate the venv first |
Activate.ps1 cannot be loaded | PowerShell execution policy | Set-ExecutionPolicy RemoteSigned -Scope CurrentUser |
Notice the pattern: four of those six are solved by using py -m rather than bare commands. Prefixing with py -m guarantees the tool runs against the Python you meant.
Which version should you install?
Take the current stable release from python.org unless something specific tells you otherwise. Some libraries lag a few months behind a brand-new major release, so if a package you need refuses to install, that is the usual cause — install the previous minor version alongside it and select it with py -3.12. Having several versions side by side is normal and is exactly what the launcher is for.
What to do next
Check the install by running something real. Open a terminal and type py to get an interactive prompt:
>>> 1_609.344 / 1000
1.609344
>>> print(f"{1234567.891:,.2f}")
1,234,567.89
That second line is Python's number formatting; the equivalent problem in the browser is covered in formatting numbers in JavaScript, which runs into the same floating-point behaviour.
Underscores as digit separators and f-string formatting are both worth knowing early. When you are ready to build something, our Python projects for beginners guide has small programs with complete, tested code — and the official "Using Python on Windows" documentation is the reference for anything unusual.
Frequently asked questions
How do I install Python on Windows 11?
Download the installer from python.org, tick "Add python.exe to PATH" on the first screen, and click Install Now. Then open a new terminal and run py --version to confirm. The process is identical on Windows 10.
Why does typing python open the Microsoft Store?
Windows includes stub executables called app execution aliases for python.exe. When no real Python is found on PATH ahead of them, the stub runs and sends you to the Store. Turn the aliases off in Settings > Apps > Advanced app settings > App execution aliases, and use the py launcher.
What is the difference between py and python on Windows?
py is the Python launcher installed at C:\Windows\py.exe. It finds the Python installations on your machine and runs the one you request, so it works regardless of PATH and lets you pick a version with py -3.12. python runs whichever python.exe PATH happens to find first.
Do I need to add Python to PATH?
Not strictly, because the py launcher works without it. But adding it is recommended — it makes python and pip work directly, and many tutorials assume it. If you skipped it, re-run the installer and choose Modify rather than reinstalling.
How do I check which Python versions are installed?
Run py --list. It prints every version the launcher knows about and marks the default with an asterisk. Run a specific one with py -3.12.
Should I install Python from the Microsoft Store?
Generally no. The Store package works for simple scripts but sandboxes file and registry access in ways that surprise beginners. The python.org installer is the version most documentation assumes.
Conclusion
The install itself is one download and one checkbox. Everything that goes wrong afterwards traces back to which Python a command actually reaches — which is why py and py -m pip are worth using from the start, and why a virtual environment per project saves you from the mess of a shared system install.
Get those habits early and Python on Windows is genuinely uneventful.
Comments