Python Fix

Python Command Opens Microsoft Store on Windows? Fix It

If typing python opens Microsoft Store instead of starting Python, Windows is usually using an App Execution Alias because it cannot find a real Python installation on PATH.

Difficulty: Easy–Medium Time: 10–25 minutes Updated: July 2026 Works for: Windows 10 / Windows 11

This issue is confusing because Windows behaves as though Python is available, yet the command does not launch an interpreter. Instead, it redirects you to Microsoft Store. That redirect is not Python itself. It is a Windows alias designed to help users install Python when no usable python.exe is found.

The correct fix depends on what is already installed. If Python is installed, disable the redirect and point Windows to the real executable. If Python is not installed, install it properly rather than repeatedly opening the Store page.

First, confirm what Windows is resolving

Open Command Prompt and run:

where python
where py
python --version
py --version

If where python shows a path inside WindowsApps, the Store alias is taking priority. If py --version works, Python may already be installed and the Python Launcher can see it even though the python command cannot.

Fix 1 — Disable the Microsoft Store Python aliases

  1. Open Settings.
  2. Go to Apps → Advanced app settings → App execution aliases.
  3. Find python.exe and python3.exe.
  4. Turn both aliases off.
  5. Close every open terminal and open a new Command Prompt.
  6. Run python --version again.

Turning off the aliases stops Windows from hijacking the command. It does not add Python to PATH, so the command may change from opening Store to showing “not recognized.” That is progress because Windows is now exposing the real configuration problem.

Fix 2 — Locate the actual Python installation

Common user-level installation locations include:

C:\Users\YOUR-NAME\AppData\Local\Programs\Python\Python312\
C:\Users\YOUR-NAME\AppData\Local\Programs\Python\Python311\

Look for python.exe. Also check the accompanying Scripts folder, which contains tools such as pip.

Test the executable directly:

"C:\Users\YOUR-NAME\AppData\Local\Programs\Python\Python312\python.exe" --version

If this works, Python itself is healthy. Only command discovery needs repair.

Fix 3 — Add Python and Scripts to PATH

  1. Search Windows for Edit environment variables for your account.
  2. Under User variables, select Path and choose Edit.
  3. Add the folder containing python.exe.
  4. Add its Scripts subfolder on a separate line.
  5. Save the changes and reopen Command Prompt.

Example entries:

C:\Users\YOUR-NAME\AppData\Local\Programs\Python\Python312\
C:\Users\YOUR-NAME\AppData\Local\Programs\Python\Python312\Scripts\
Do not add the path to python.exe itself. Add the folder containing it. Avoid deleting unrelated PATH entries while editing the list.

Fix 4 — Repair the Python installation

If the installation folder exists but Python does not start, open Installed apps, locate Python, choose Modify, and run Repair. If Repair is unavailable, rerun the official installer for the same version and enable the option to add Python to PATH.

Fix 5 — Reinstall cleanly when the installation is incomplete

Remove only the broken Python version, restart Windows, then install the required version from the official Python installer. During setup:

Verify the final result

where python
python --version
python -m pip --version

The first command should point to a real Python installation, not the WindowsApps alias. The pip command should report the same Python installation path.

FAQ

Why does Windows include a Python Store alias?

It is a convenience shortcut for systems without Python. It becomes a problem when it takes priority over an existing installation.

Should I install Python from Microsoft Store?

The Store version can work, but the standard installer gives clearer control over PATH, versions, and development tools. Use one method consistently.

Why does py work while python opens Store?

The Python Launcher can locate installed versions independently, while the python command depends on PATH and aliases.