Python Is Not Recognized On Windows: How To Fix It (2026)
Quick answer
- Install the Python install manager from the Microsoft Store or python.org/downloads, open a new terminal and type python; if Windows still says the command is not found or opens the Store, open Start, search for Manage app execution aliases and make sure the Python (default) alias is on.
- Check that your PATH contains %UserProfile%\AppData\Local\Microsoft\WindowsApps, the folder where those aliases live.
- If py works but python does not, or py says it cannot open a file, old Python installs or the legacy Python launcher are the usual cause, and the Python documentation says to remove them in Installed apps.
Applies to: Python install manager on Windows, as described in the Python 3.15 documentation
This guide is for anyone who types python in Command Prompt or PowerShell and gets a message that the command is not recognized, or sees the Microsoft Store open instead.
On Windows the cause is almost always that no Python is installed, that the Windows alias for it is switched off, or that an older Python install is getting in the way.
Every step below comes from the official Python documentation page “Using Python on Windows” (Python 3.15.2), which this guide read on November 29, 2026.
Table of Contents
- Quick answer: match your symptom to the fix
- Step 1: install the Python install manager
- What the python command does
- Step 2: turn on the app execution alias
- Step 3: check the WindowsApps folder is on PATH
- Step 4: remove the older Python launcher
- When python and py start different versions
- If the message is about py
- Do you need to add Python to PATH yourself
- Check that it worked
- After python works
- Source
- More Windows fix guides
Quick answer: match your symptom to the fix
| What you see | Most likely cause | Fix |
|---|---|---|
python says command not found or opens the Store | Python install manager missing, or its alias is off | Install it, then turn on Python (default) in Manage app execution aliases |
py says command not found | Same as above | Same steps, then check the WindowsApps PATH entry |
py says it cannot open a file | The older Python launcher has priority | Uninstall “Python launcher” in Installed apps |
python starts a different Python than py | An older install or PATH change is first | Remove it or turn off its PATH option, and set the alias to Python (default) |
Step 1: install the Python install manager
The Python documentation describes the install manager as the tool that makes Python available as global commands on Windows.
You can get it from the Microsoft Store app or from python.org/downloads, and the documentation says the two versions are identical.
- Open the Microsoft Store listing for Python install manager, or the downloads page on python.org.
- On the Store, click Install.
- When it finishes, close any open terminal and open a new one.
- Type
pythonand press Enter.
If you downloaded the file from python.org instead, double-click it and select Install, or run the command below in Windows PowerShell with the path to the MSIX file.
Add-AppxPackage <path to MSIX>The documentation says that after installation the python, py and pymanager commands should be available.
It also says that if you already have Python installs or have changed PATH yourself, you may need to remove them or undo the changes.
What the python command does
The documentation calls python the recommended command for launching Python.
It starts the version your script asks for, the active virtual environment, or the default installed version, which is the latest stable release unless you configured another.
If no Python is installed yet, the documentation says the latest release is installed for you the first time you run it.
| Command | What the documentation says it is for |
|---|---|
python | The recommended command for launching Python |
py | Can be used anywhere in place of python or the older py.exe launcher |
pymanager | An unambiguous command, useful when the older launcher has taken the py name |
python3 | Catches accidental use of the POSIX name and is not meant to be widely used |
Step 2: turn on the app execution alias
If you installed the manager and python still opens the Store or reports command not found, the alias is the next thing to check.
- Click Start and open Manage app execution aliases.
- Find Python (default) and make sure it is switched on.
- If it is already on, switch it off and on again to refresh the command.
- Check the Python (default windowed) and Python install manager entries, which may also need refreshing.
- Open a new terminal and try
pyandpymanagerto see whether those commands work.
Step 3: check the WindowsApps folder is on PATH
The documentation says your PATH must contain %UserProfile%\AppData\Local\Microsoft\WindowsApps.
Windows includes that entry once by default, after your other user paths, and the documentation warns that if it was removed the shortcuts will not be found.
To look at or restore it, follow our guide to editing environment variables and PATH in Windows 11.
Step 4: remove the older Python launcher
The documentation lists a separate symptom, where py gives a “can’t open file” error.
Its explanation is that the older launcher is usually installed and has priority over the new one.
- Click Start and open Installed apps.
- Search for Python launcher.
- Uninstall it.
The documentation adds that when the older launcher is installed its py command overrides the install manager one, so you then use pymanager for installs and uninstalls.
When python and py start different versions
If python does not launch the same Python as py, the documentation points to leftovers from earlier installs.
- Click Start and open Installed apps.
- Look for existing Python runtimes and remove them, or choose Modify and turn off their PATH options.
- Click Start, open Manage app execution aliases, and check that the python.exe alias is set to Python (default).
If the wrong version starts rather than none, run the command below to see which one is the default.
py listThe documentation says the default can be set by the PYTHON_MANAGER_DEFAULT environment variable or a configuration file, so check those if the list shows a surprise.
If the message is about py
The documentation quotes this exact message for the older launcher: ‘py’ is not recognized as an internal or external command, operable program or batch file.
It states that this means the launcher is not installed, which is why installing the install manager is the first step above.
Do you need to add Python to PATH yourself
The documentation says that when you first install a runtime you will likely be prompted to add a directory to PATH, and that this is optional if you prefer the py command.
The offer exists for people who want the full range of aliases, such as python3.15.exe, to be available.
| Item | Value on the Python page |
|---|---|
| Default directory it offers to add | %LocalAppData%\Python\bin |
| Where to add it | Click Start and search for Edit environment variables for your account |
| Who can change the directory | An administrator may customize it |
| Scripts of each runtime | Each runtime has its own scripts directory, which must also be on PATH to use those tools |
Check that it worked
Open a new terminal window, because an old one keeps the PATH it started with, and run the command below.
py helpThis prints the help for the install manager, which confirms the py command is found.
Then type python, which should open the interpreter prompt instead of an error or the Store.
After python works
If you need an editor, see our guide to installing Visual Studio Code on Windows 11.
A related problem is a missing pip command, which the same Python page covers as its own symptom.
Source
More Windows fix guides
- How To Fix A Blue Yeti Mic Not Recognized On Windows (2026)
- How To Fix “DNS Server Not Responding” On Windows (2026)
- Microsoft Visual C++ Redistributable: Download And Fix (2026)
- How To Fix Low Or Missing Sound On Windows 11 (2026)
- Free PC Tweaks To Speed Up a Slow Windows 11 or 10 PC (2026)
- Downloads Folder Missing Or Full In Windows 11? How To Fix
See all: Windows 11 Guides