You installed Python. You know it’s installed. But when you open Command Prompt or PowerShell and type python
, Windows responds with this gem:
“Python was not found; run without arguments to install from the Microsoft Store…”
No. Absolutely not.
This happens because Windows, in its infinite wisdom, includes a fake python.exe
shim that tries to route all Python commands through the Microsoft Store unless you explicitly bypass it.
Here’s how to shut that down.
Step-by-Step: Actually Run Python, Not Microsoft Store Garbage
1. Confirm Python Is Installed
First, check that Python is really there:
- Hit
Win + S
, type “Add or Remove Programs”, and confirm Python shows up. - Or navigate to:
C:\Users\<YourName>\AppData\Local\Programs\Python\Python3x
(Exact path will vary based on version.) - Inside that folder should be
python.exe
andpythonw.exe
If not, install Python directly from:
https://www.python.org/downloads
Avoid the Microsoft Store version.
2. Check What Happens in Command Prompt
Open a new Command Prompt (not PowerShell). Type:
where python
If the result is something like:
C:\Users\<YourName>\AppData\Local\Microsoft\WindowsApps\python.exe
That’s the fake one. You’re being hijacked.
3. Fix Your System PATH
Go to:
Start > Settings > System > About
- Click Advanced system settings
- Under the Advanced tab, click Environment Variables
Under System Variables, find Path
, click Edit.
Now make sure of two things:
The actual Python install path is listed, e.g.:
C:\Users\<YourName>\AppData\Local\Programs\Python\Python3x\
Move that line above the Microsoft Store line (WindowsApps)
Or, if you’re not using any apps from the Windows Store, you can remove this line entirely:
C:\Users\<YourName>\AppData\Local\Microsoft\WindowsApps
Click OK > OK > OK.
4. Restart Command Prompt
Close all terminals. Open a fresh Command Prompt and run:
python --version
It should now return something like:
Python 3.12.1
No more Microsoft Store prompts. Just Python.
Bonus: Fix PowerShell Too
PowerShell can also get caught by the same PATH mess. Close and reopen it, or run:
Get-Command python
Make sure it points to your real install path, not WindowsApps
.
Done.
You now have real Python on Windows without Microsoft’s detours. PATH issues like this are one of the most common causes of broken command-line tools, and fixing them is a solid example of actual troubleshooting: identify the hijack, fix the priority order, and confirm it’s working.