CMD opens window store when I type python

Two solutions:

  1. As ChipJust said it may be possible to use "py" as the new alias for python in Windows10.

  2. As explained here https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/, use the search bar to find "Manage App Execution Aliases". There should be two aliases for python, see image, unselect them, which will allow the usual python aliases "python" and "python3"

This works because Microsoft created the %USERPROFILE%\AppData\Local\Microsoft\WindowsApps dir for the Execution Alias system. There is a empty or "fake" *.exe in that dir because that essentially is the alias. What is really cool about MS's implementation, is that disabling the alias deletes the empty *.exe. Thus when you type the alias python, or spotify, etc, in cmd, Windows searches for the alias but won't find the empty *.exe anymore, and instead keeps searching the PATH until it finds the *.exe at the installed location if on the PATH. It is beneficial because you don't have to keep reodering the path for every new program you install that also has an alias, and based on the blog post by MS, it seems like this is the intended use.


I had problems with this as well, where Windows didn't recognize Python or Anaconda in a double click or cmd (command) prompt.

  • Problem: unable to import libraries in "python" cmd in windows. Instead the windows "python" cmd took users somewhere they don't want to go.
  • Problem Cause: In Windows "Environmental Variables", Windows adds a python.exe and python3.exe (I don't know where these link to) in the "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps" directory.

Solution: I tried deleting the python*.exe files in the WindowsApp directory, but windows wouldn't allow it, so I opened a command prompt in the "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps" directory, typed:

del python.exe
del python3.exe

Then I created a environment variables linking to the installed python link, in my case was C:\Anaconda3; C:\Anaconda3\Scripts and some others for good measure


The main problem here is that the order in the path calls the windows from top to bottom, and that there is python.exe in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps which is called first if there are no other python.exes in the PATH above that line.

To ensure that the correct python.exe is called, add the python installation folder (containing python.exe) to the PATH, above %USERPROFILE%\AppData\Local\Microsoft\WindowsApps

Here is an example:

  • To get to this location, click "Start" -> start typing "Env" -> Select "Edit the system environment variables" -> "Environment variables" -button -> Select the entry for "Path" in the upper list -> Click "Edit".

enter image description here

  • Python components should be at the top, as in step 5. If not, move up by pressing the button in step 6.