Python was not found; run without arguments to install [Fix]

Python was not found; run without arguments to install

Python was not found; run without arguments to install

In this guide, we will show you the steps to fix the “Python was not found; run without arguments to install from the Microsoft Store” error. This high-level programming language supports multiple programming paradigms, including structured, object-oriented, and functional programming. Moreover, it is being increasingly used in the Android ecosystem as well.

Many open-source tweaks involve the use of Python modules and even extracting the OnePlus stock firmware [payload.bin] requires executing a couple of Python commands [if you are opting for the CLI route]. In this regard, I was recently compiling a technical guide that required the installation of Python.

My PC already had it installed so I proceeded ahead to the next step of installing the requirements from the text file, however, I was straight away greeted with the “Python was not found; run without arguments to install from the Microsoft Store” error. The Python was installed right in front of my eyes and I could easily access it from its default directory C:\Users\<username>\AppData\Local\Programs\Python\Python<version>.

Python was not found; run without arguments to install

However, for some reason, the CMD window just refused to acknowledge this fact. Still, just to be double sure, I executed the python –version command and got the installed Python version as the result. So this made the matter even more weird. And yes, if you are wondering, the CMD window was indeed opened inside the Python directory itself.

Just to be double sure that any files aren’t missing or the modules haven’t been outdated, I uninstalled and then reinstalled the latest version of Python from its official site and also instructed it to Add Python to Path [during the initial setup process]. After that, I tried reinstalling the requirements but unfortunately was once again greeted with the same error message. So why is this happening and more importantly how to rectify it? Let’s find out.

Python was not found; run without arguments to install

The fix for this issue is quite simple- all that you need to do is simply disable the App Execution Aliases for both Python as well as Python Installer. But what exactly is an App Execution Aliases? Well, apps can declare a shorter different name for themselves [alias] that could be used to invoke or launch it across numerous apps, such as PowerShell, Run, and Command Prompt.

If multiple apps use the same alias, then it might lead to a conflict and the OS might get confused as to which app should it actually launch. For instance, if both the Python and Python Installer have the same alias, and you try to launch either of the two from the CMD window, then the OS might be left scratching its head.

So it will end up playing a safe game and simply throw an error message instead of launching all the apps having the same alias. However, we are then left with the inability to launch and interact with the required app. So to rectify this issue, you need to disable the app alias for all those conflicting apps, which could be done as follows:

  1. To begin with, launch the Settings menu via the Windows+I shortcut keys.
  2. Then select Apps from the left-hand side and go to Advanced app settings.
  3. Now go to App execution aliases and scroll to and disable the toggle next to
    Python 
    Python Installer
  4. Now type in the desired commands and you’ll no longer the error message.Python was not found; run without arguments to install

If you were earlier getting the error while trying to install the requirements, then try executing any one of the below commands now to install the requirements and you’ll no longer any errors.

python3 install -r requirements.txt
python install -r requirements.txt
pip install -r requirements.txt

requirements python text file

That’s it. These were the steps to fix the “Python was not found; run without arguments to install from the Microsoft Store” error. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.

Why I am Getting Python was not found even though Python is Installed

While you might come across quite a few errors while using Python, however, this might be the most confusing one. The reason for the same is quite simple- even though Python is installed on your PC and you can easily access all its files,m yet the Command Prompt/PowerShell states otherwise. So why is this happening?

Python was not found; run without arguments to install

Well, the reason for the same is the Windows built-in App Execution Aliases which ends up creating quite a conflicting situation for the CLI which in turn is unable to find any Python-related files on your PC. So to rectify the “Python was not found” error, you just need to disable the App Execution Aliases for Python as well as Python Launcher on your Windows PC. Get this job done from the Settings > Apps section and your task stands complete.


Leave a Reply

Your email address will not be published. Required fields are marked *