If you’ve just installed Python on Windows and when trying to run python from the Command Prompt you see this message:
"Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases."
Don’t worry
This is a common problem caused by Windows redirecting your Python commands to the Microsoft Store. In this post, I’ll walk you through the exact steps to fix it, so you can start coding right away.
What Causes This Issue?
Windows 10 and 11 have a feature called App Execution Aliases that adds shortcuts for certain apps, including Python. If Python isn’t properly installed or the PATH isn’t set, Windows tries to redirect your command to the Store to download Python.
This causes confusion because even if you installed Python manually, typing python will still bring up this message.
Step-by-Step Fix: Disable Python App Execution Aliases
Step 1: Open Windows Settings
- Press Win + I on your keyboard
- This opens the Settings window
Step 2: Navigate to App Execution Aliases
- In Settings, click on Apps
- Then click on Advanced app settings (or search for “App execution aliases” in the Settings search bar)
- Scroll through the list until you find:
python.exe
python3.exe
Step 3: Disable the Aliases
Toggle the switches OFF for both python.exe and python3.exe
Step 4: Verify the Fix
Open a new Command Prompt window
Run the command:
python --version
You should now see the Python version you installed, e.g.:
Python 3.13.x
Bonus Tips
Always make sure you install Python from python.org and check the box Add Python to PATH during installation.
If you don’t see Python in your PATH, you can manually add it by editing your environment variables.
Use python -m pip instead of just pip to ensure you’re using the correct pip for your Python version.
Summary
Disabling the Windows App Execution Aliases for Python is a quick and effective fix for the “Python was not found” error. Once disabled, Windows stops redirecting your commands to the Microsoft Store, and you can run Python smoothly from the terminal.
Top comments (0)