You type python in a terminal and Windows opens the Microsoft Store, or the command is not found even though Python seems to be installed. Since Python 3.14, the recommended installation method on Windows is the Python install manager, which provides the python, py and pymanager commands. Most failures come from a Windows shortcut taking Python's place, a disabled alias or an old Python left on the PC.
Observe before acting
Open a new terminal window and test the three commands:
python --version
py list
pymanager help
| What you see | Most likely cause | Step |
|---|---|---|
| python opens the Store, py unknown | Python not installed, Windows shortcut active | Step 1 |
| Python installed but no command responds | Aliases disabled or PATH modified | Step 2 |
| py answers "can't open file" | Legacy launcher takes priority | Step 3 |
| python and py give two different versions | Old installation in the PATH | Step 4 |
| python works but not pip | Package shortcuts missing or virtual environment not activated | Step 5 |
Why "python" opens the Microsoft Store
Microsoft added a python shortcut to Windows which, as long as no Python is installed, leads to the Python page of the Microsoft Store. When launched with arguments (for example python script.py), this shortcut only returns an error code, to avoid opening the Store from a script. So this is neither a virus nor a fault: Python is simply not installed, or is not found before this shortcut.
Step 1: install the Python install manager
When to use it: python opens the Store and py is unknown.
Expected result: python --version displays a version without opening the Store.
Rollback: the manager is uninstalled from Installed apps. Note: uninstalling it does not remove Python versions already installed.
Step 2: check the execution aliases and the PATH
When to use it: Python is installed with the manager, but python or py is still not found, or python still opens the Store.
Expected result: python, py and pymanager respond.
Rollback: the aliases are returned to their previous state in the same place; an entry added to the PATH is removed from the same window.
Step 3: "py" answers "can't open file"
When to use it: the py command exists but returns this error.
Expected result: py list displays the versions managed by the install manager.
Rollback: the legacy launcher can be reinstalled, but it will conflict with the manager again.
Step 4: "python" and "py" do not launch the same version
When to use it: python --version and py --version display different versions.
Expected result: both commands launch the same version.
Rollback: an uninstalled version can be reinstalled with py install followed by the desired version.
Do not uninstall a Python supplied by another program (development tool, scientific software) without checking that it does not depend on it.
Step 5: "pip" is not recognized
When to use it: python works but pip or an installed package's command cannot be found.
Expected result: python -m pip --version responds; after py install --refresh, package commands are available in a new terminal.
Rollback: none.
If activating the virtual environment in PowerShell is refused, see "Running scripts is disabled on this system" in PowerShell.
Final check
- ☐ python --version displays a version without opening the Store.
- ☐ py list shows the expected default version.
- ☐ python -m pip --version responds.
If the failure persists, the manager writes its logs to the %TEMP% folder: they are useful for a bug report.
Sources
- Python documentation: Using Python on Windows
- Microsoft Learn: Using Python on Windows for beginners
- Python.org: Downloads
Still having the problem?
Reply to this topic with your Windows version (winver), how Python was installed (Store, python.org, other software), the output of python --version and py list, and the exact message you get. Remove your user name from paths before copying them.