-->
How to fix: Python was not found Error: Run without arguments to install from the Microsoft Store or disable this shortcut from Settings Manage App Execution Aliases.

How to fix: Python was not found Error: Run without arguments to install from the Microsoft Store or disable this shortcut from Settings Manage App Execution Aliases.

Back to top

Updated by Ashirafu Kibalama on May 25, 2024

Troubleshooting Python Installation on Windows: Resolving the "Python was not found" Error:

 


So, you're a Windows user, and you're all set to verify your Python installation by running the python --version in the Command Prompt. 


But an error message pops up, stating, 'Python was not found error; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.' 

This Error means that Python is not properly recognized in your system's PATH or that you don't have Python installed.

This Error can be quite a head-scratcher, especially if you were under the impression that Python was already installed or if you were starting with Python development.

This blog post will guide you in troubleshooting and resolving this issue. 

We'll cover configuring your system's PATH to ensure you can access Python from the Command Prompt. 

By the end of this guide, you'll have Python up and running, ready for you to dive into coding. 

Whether you're a beginner or an experienced developer, these steps will help you easily overcome this common setup hurdle and get back to your Python projects.

8 Steps to fix: Python was not found Error: Run without arguments to install from the Microsoft Store or disable this shortcut from Settings Manage App Execution Aliases.


Step 1) Install Python if not Installed:

First, make sure Python is installed on your system:

Step 2) Find the python file installation location:

To find the installation location of Python on your system, you can use the following steps:

1: search for Python in search.


2: Right-click the Python version on your system and then click open file location.




3: Again, Right-click the Python version on your system and then click open file location.

 Python version: 


4: Click on the file location bar. 



5: Copy file location.


That's the Python file installation location i.e. C:\Users\User\AppData\Local\Programs\Python\Python312

After finding the Python file installation location, go to step 3) as illustrated below.

Step 3) Go to search and search for the environment:

 Then click edit the system environment variables.




Step 4) Click Environment Variables:



This appears:


Step 5) Click Path with the system variables section: 




Then click edit within the system variables:



This appears:



Step 6) Add the Python file location path to the system variables:

So click new:


Copy and paste your python file installation location path here as illustrated below: [check step 2) if you donot remember] like:

C:\Users\User\AppData\Local\Programs\Python\Python312





Again, click new:



Step 7) Go back to the Python file installation location and click Scripts:




This appears:



Then click on file location bar:


Then copy the python file installation location:



ie. C:\Users\User\AppData\Local\Programs\Python\Python312\Scripts.

Step 8) Repeat step 6) by clicking new and then use the new path you have got from the scripts location: 




Paste the python file installation location from scripts and finally click ok:



Before we conclude, we have added two paths ie. 


So close your command prompt for the changes to be processed and then open it to test if Python is found within the system, as illustrated below:




Conclusion

Encountering the "Python was not found" Error can be frustrating. However, by following the eight steps illustrated above, you can quickly resolve the issue. 

With Python properly installed and configured, you're ready to explore this powerful programming language's possibilities. 

Thank you for following this guide, and happy coding! Please comment below if you encounter any further issues or have any questions.

Other posts:

'From' Keyword is not Supported in This Version of The Language Python Pycharm/ Vscode Fix.

Pycharm Pip Install Not Working/ Pip The term 'pip' is not Recognized as the Name of a Cmdlet Pycharm 

With Example Learn: How do I Fix the Environment Location Directory is Not Empty in PyCharm? 

A Beginner's Complete Guide: Deploy Flask App with SQLite/ PostgreSQL Database on cPanel/ shared hosting