How to fix the error- Python was not found ; run without arguments to install from the Microsoft Store , or disable this shortcut from Settings?

When you try to execute any python or py command from the Command Prompt, the following error is seen-
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings

 

To solve this error, firstly, ensure that you have successfully installed Python on your system.

One way of verifying is by checking the version number of Python.

If Python is not installed on your system, go ahead and install Python.

If you are still seeing the error, don’t worry. In this article, we have compiled the solutions to overcome this error.

Fix 1: Add Python to PATH

In Python 3.6+, you can Add Python to PATH during the installation. If you haven’t checked this option for some reason during your first installation, you can still modify the installation using the Python installer. To do so, follow the below steps.

1. Open the Run window using Windows+R.

2. Type appwiz.cpl and press Enter.

 

 

3. In the opening window, locate the installer file.

4. Right-click on the Installer and select Change.

 

 

3. In the Setup window that shows up, select Modify.

 

 

4. In the appearing window, click on the Next button.

5. In the Advanced Options window, check Add Python to environment variables checkbox.

6. Click Install.

 

 

This will update the PATH environment variable.

With this, the Python path will be added to the PATH User Variable.

7. Close and re-open the command prompt and enter the ‘python’ or ‘py’ commands.

Fix 2: Turn Off the Aliases of Python

1. Open the Run Dialog using Windows+R.

2. Type ms-settings:appsfeatures and press Enter.

 

 

3. In the opening window, click on More settings.

4. Click on App execution aliases.

 

 

5. Locate Python and turn it off.

 

 

Fix 3: Add Python to PATH System Variable

If none of the above fixes help, try this out.

1. Open the Run Dialog using Windows+R.

2. Type sysdm.cpl and press Enter.

 

 

3. Go to the Advanced tab and click on the Environment Variables button.

 

 

4. Under the System variables section, search for Path variable.

5. Click on Edit.

 

 

6. In the Edit environment variable window, click on New.

7. Add the path to Python and Scripts. By default, they are located in the below location.

C:\Users\%username%\AppData\Local\Programs\Python\Python310\Scripts\
C:\Users\%username%\AppData\Local\Programs\Python\Python310\

Note:

If you have used a custom location during the installation, specify that path.

 

 

8. Click on OK.

Conclusion

In this article we have discussed different ways of fixing the error, “Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings.”

Thank you for reading. We hope this article has been informative. Kindly comment and let us know the solution that helped you solve the error.

If you enjoyed reading, share this article.

Anusha Pai is a Software Engineer having a long experience in the IT industry and having a passion to write. She has a keen interest in writing Python Errorfixes, Solutions, and Tutorials.

Leave a Comment