The Python runtime may already exist on disk even when the plain command is unavailable in the current terminal.
Python Not Recognized in CMD or PowerShell? Find the Broken Layer
If CMD or PowerShell says 'python' is not recognized, don’t reinstall Python or edit PATH blindly. First check whether py works, then separate a missing runtime from PATH or App Execution Aliases.
First, run python --version
Open a new Command Prompt or PowerShell window. Don’t change anything yet—just run this and choose the result that matches what you see.
python --versionsafe diagnosticIf python is not recognized, check whether py works
This tells us whether Python is reachable through another command, or whether we first need to check if Python is installed at all.
py --versionsafe diagnosticIf Python opens Microsoft Store, check py before changing aliases
The Store/install prompt means a Windows app-execution alias is handling python. That can be normal with current Python setups, or it can be a placeholder. Let’s get one more signal before we change anything.
What happens when you run py --version?
py --versionsafe diagnostic
The python command is working here.
So this exact command-resolution problem is not present in this terminal right now. If only VS Code is failing, that’s a different interpreter-selection problem—and I don’t want to fake a diagnosis for it in this reviewed path.
If py works but python does not, find the runtime Windows can already reach
A Python runtime is reachable. Next, let’s find the runtime py is using and see what Windows finds for the plain python command. Both checks are read-only.
py -c "import sys; print(sys.executable)"read-onlywhere.exe pythonread-onlyCheck whether you use Python Install Manager or a classic python.org install
Use the path you just inspected as a clue. Current Python Install Manager setups and classic python.org installs handle command discovery differently, so I don’t want to give you the wrong repair steps.
Check Installed apps and App execution aliases—don’t change anything yet.
Open Settings → Apps → Installed apps and search for Python. Then search Start for Manage App Execution Aliases. We’re only looking for clues right now.
You see Python Install Manager or aliases such as Python (default) / Python install manager.
You see a versioned Python installation from python.org and the executable path points to a traditional Python folder.
Fix App execution aliases and WindowsApps command access
- Open Start and search Manage App Execution Aliases.
- Check that the Python aliases for the current manager—especially Python (default)—are enabled. If an enabled alias appears stuck, toggling it off and back on can refresh it.
- Make sure your user PATH still contains
%UserProfile%\AppData\Local\Microsoft\WindowsApps. Add it only if it is missing; do not delete unrelated PATH entries. - Close every terminal window, open a new one, and run
python --versionagain.
After you open a new terminal, what happens now?
Fix Python PATH without deleting unrelated entries
The safest first option is to rerun the matching python.org installer and use its Modify/Repair options, enabling the PATH/environment option when available. If you edit User PATH manually, add the folder containing the real python.exe you identified—and its matching Scripts folder. Don’t delete unrelated PATH entries.
py -c "import sys; print(sys.executable)" is our evidence for which Python installation you actually use.- Repair/modify the existing installation or add the correct runtime folder to User PATH.
- Close every terminal window.
- Open a new terminal.
- Run
python --version.
If both python and py fail, check whether Python is installed
Open Settings → Apps → Installed apps and search for “Python”. This check doesn’t change anything on your computer.
Python is installed but neither command works — verify aliases and PATH
Next I want to identify the installation style. A current manager setup and a classic python.org install need different repair paths.
If Python is not installed, use an official Python source
If neither python nor py works and nothing Python-related appears in Installed apps, there may be no usable runtime to point PATH at. An official installation is the cleaner fix.
After installation, close the old terminals, open a new one, and run python --version. What happens?

Verify the fix and confirm which Python executable launches
Seeing a version is good. This read-only command confirms the actual executable behind python, so we know we fixed the right thing.
python -c "import sys; print(sys.executable)"read-onlyDoes it show the Python installation you expected?

Yeah — we fixed it. 😎
The plain python command now reaches the Python runtime you intended to use. More importantly, we know what we changed and why it worked.
That’s how I want every ITFixLab guided fix to work.

That didn’t solve it. I’m not going to make you guess.
This reviewed path has reached its limit. Please don’t delete Python folders, remove random PATH entries, or run destructive commands just to force a result.
I don’t want to squeeze that result into the wrong diagnosis.
This journey covers Python command discovery. A crash, access-denied error, broken standard library, or IDE-only issue needs a different focused path.
Python can be installed and the python command can still fail.
Installing Python and resolving the word python are two related but different things. When you type a command, Windows has to decide what executable that name refers to. Depending on how Python was installed, that decision can involve PATH entries, Windows app-execution aliases, the Python launcher or Install Manager, and the terminal process you currently have open. That is why this journey checks what Windows actually resolves before asking you to repair anything.
Windows still needs a route from the name python to the intended executable. PATH and execution aliases can affect that route.
If several Python installations exist, a working command can still launch a different interpreter than the one you expected. That is why the journey verifies the final executable path.
Think of the command as a name Windows has to map to a real program.
The exact implementation differs across Python installation generations, so this journey does not assume one installer. Instead, it uses observable results. python --version tells us whether the plain command works. py --version gives another route to a Python runtime on systems where py is available. where.exe python shows matching command paths that the current environment can discover. Finally, asking Python for sys.executable tells us which interpreter actually launched.
python or py in a terminal.sys.executable confirms the runtime behind the command instead of guessing.
An old terminal may still be using an old copy of the environment.
When PATH or command-routing settings change, a terminal window that was already open may not immediately reflect the new environment. Testing again in the same old window can make a correct repair look like it failed. That is why the journey asks you to close the old terminal, open a fresh Command Prompt or PowerShell window, and then rerun the original command.
python --version again so the outcome is measured against the problem you actually started with.Your current computer is better evidence than your memory of an installer screen.
You may have installed Python months ago, upgraded it, installed another version later, or changed Windows settings since then. Asking you to remember one checkbox is weaker evidence than checking what the terminal does now. This journey therefore branches from current, observable results: whether python works, whether py works, which paths Windows can see, what is listed in Installed apps, and which executable Python reports when it finally launches.
That also keeps the repair smaller. If py already reaches a runtime, reinstalling everything is usually a poor first move. If neither command works and no Python installation appears, inventing PATH entries is equally poor. Each branch exists to avoid those assumptions.
Official Windows Python checks behind this diagnosis
Python’s current Windows documentation specifically calls out the same command-not-found and Microsoft Store symptoms this journey tests. For current Python Install Manager setups, it recommends checking App execution aliases, whether py or pymanager works, and whether the WindowsApps directory is still available through PATH before assuming the runtime is missing.