Typing “python” on Windows 10 (version 1903) command prompt opens Microsoft store
Solution 1
Fixed it by removing it automatically on the settings page. Under Apps and Features, there are an application execution aliases.
I am running the latest 1903 update.
Solution 2
Deleting "C:\Users\Username\AppData\Local\Microsoft\WindowsApps\" from the system environment variable, PATH, prevented the Microsoft Store application from launching when I typed python.exe
and python3.exe
in a command prompt.
The folder WindowsApps within AppData has a bunch of executables that, if typed in a command prompt, such as iTunes
or python
would launch the Microsoft Store application allowing the user to download the Python or iTunes UWP application. Once this path is removed from the system variable, typing python.exe
or python3.exe
, will not launch the Microsoft Store.
This may sound dangerous but if you look in the folder, it has a bunch of exes that, as I said before that would redirect you to download Python from the Microsoft Store. If for example, you type in iTunes
in the command prompt, it would redirect you to download iTunes from the Microsoft Store.
These executables are built for the user's convenience and are not necessary tools for Windows to work.
Solution 3
As @Ramhound mentioned in a previous answer, this is an intentional change as announced in the article: Who put Python in the Windows 10 May 2019 Update?
The article describes the team's intent to make the process easiest for users new to Python:
If you’re already a Python expert with complex needs, you probably know how to install and use it. It’s much more likely that someone will hit this problem the first time they are trying to use Python. Many of the teachers we spoke to confirmed this hypothesis – students encounter this far more often than experienced developers.
So we made things easier.
I could not find a full list of features from 1903 on the microsoft site, but PureInfoTech provides a great comprehensive list of the new features
Not mentioned in the article, it also accompanies some new layout changes and features updates, such as in the Apps & Features in settings:
Turning the switch for each App execution alias either deletes or replaces that alias in the directory:
<user dir>\appdata\local\microsoft\windowsapps
It's also worth noting that if you have the update and python.exe or any of the aliases don't work for you, you may have to turn them off and on again, which I was able to do when python.exe was not available after the update.
Solution 4
Below worked for me:
- Uncheck python from "App execution aliases" Update's answer
- Delete the WindowsApps directory Tushar's answer
- Set
Path
variable toC:\Users\<user>\AppData\Local\Programs\Python\Python37
Solution 5
On typing python from Search, opens the python 2.7 prompt but when I type from command prompt window, it triggers Microsoft Store.
Don't know how to fix it. This never happened on previous versions of windows (RS5, RS4...)
This is intended behavior on Windows 10 version 1903. There isn’t anything to fix.
While Python continues to remain completely independent from the operating system, every install of Windows will include python and python3 commands that take you directly to the Python store page. We believe that the Microsoft Store package is perfect for users starting out with Python, and given our experience with and participation in the Python community we are pleased to endorse it as the default choice.
Related videos on Youtube
![Dr. Essen](https://i.stack.imgur.com/LRLbK.jpg?s=256&g=1)
Dr. Essen
Updated on September 18, 2022Comments
-
Dr. Essen almost 2 years
This is strange issue I have observed. I installed Active Python 2.7 on Windows 10 (version 1903).
On typing “python” from search, opens the Python 2.7 prompt but when I type from command prompt window, it triggers the Microsoft Store.
Don't know how to fix it and this never happened on previous versions of Windows (RS5, RS4…)
Edit 2: Please suggest the solution to turn this off: either via command prompt or using answer file to get this after unattended installation.
-
Biswapriyo about 5 yearsMay be that was some sort of advertising, py3.7 is in Windows Store. But I'm using it, not an issue.
-
Dr. Essen about 5 yearsAre you using python 2.7? if your system doesn't have python 3.x but 2.x, try typing python in cmd prompt, see what happens?
-
Biswapriyo about 5 yearsWhat does this command reveal?
where python
-
Dr. Essen about 5 yearsTwo options: - C:\Python27\python.exe ; C:\Users\Username\AppData\Local\Microsoft\WindowsApps\python.exe
-
Biswapriyo about 5 yearsYou got your answer. The second option does not exist in normal python installation.
-
Dr. Essen about 5 yearsbut how it is coming like this? In windows 10 RS5, I never saw this behaviour.
-
Ramhound about 5 yearsThis was intended behavior. Microsoft added this behavior with 1903 because they recognized developers struggle getting Python installed. I read about this change but I don’t recall where I read it.
-
Adrian McCarthy over 4 yearsOf note: if you don't have a Microsoft account, triggering the Microsoft Store just launches Edge and gives you an incomprehensible error message.
-
CristiFati over 4 yearsYes the problem was triggered by the 2 App installer aliases. One way that never fails is using full paths: stackoverflow.com/questions/59885771/….
-
Brent Writes Code about 4 yearsObserved the same behavior on a fresh Python3 install from python.org just now. And Get-Command "python.exe" in Powershell returned the proper path to my installed python.exe. I am flabbergasted this is a thing.
-
-
CaldeiraG about 5 yearsWelcome to Super User! Can you please explain what that does?
-
Daniel K about 5 yearsSounds like this could have some undesired side-effects.
-
Tushar Gautam about 5 yearsthere were python.exe and python37.exe(i have python3.7) files that were being called by system when I typed "python" in cmd, which in turn was opening Microsoft store to download python distribution. I tried deleting those files but Windows 10 would not let me. So i delete that folder's path from System variables. So , now the actual python.exe(the one that I installed with python distro) is called when I call it in cmd.
-
Tushar Gautam about 5 years@DanielK There can be side effects but in my case, there was only one additional file(other that python.exe opening microsoft store) that was debian.exe(this starts wsl debian). I can also start wsl using "wsl" or "bash" keyword and also "debian" keyword is also still working in cmd. So I did not see any side effects so far. I think that folder has mostly redundant files.
-
phuclv about 5 yearsMoving the path to the end may be better than removing it
-
Asker almost 5 yearsThis didn't work for me -- even after removing from PATH, the Microsoft store still opened whenever I typed python in cmd. What did work for me was going to "Manage app execution aliases" in Apps & Features, then unticking the "python.exe" App Installer box.
-
Rudiger Wolf almost 5 yearsHow do I rename these files. They are 0 bytes in size? Also opened cmd terminal as admin. Not able to remove :(
-
Rudiger Wolf almost 5 yearsDeleted python3.7 and then installed python3.8 followed by python3.7. That sorted out running python from the powershell terminal.
-
Dr. Essen almost 5 yearsPlease tell me how to do this setting from command prompt. And also through the answer file to get this in unattended installation.
-
selbie almost 5 yearsBest bet is to have a script to remove the WindowsApps folder from the PATH environment variable.
-
Tim over 4 yearsThank you... . This is the kind of thing that makes me HATE windows. I had to go remove it from the path then i got worried i had a virus because i see this 0byte exe thinking wtf... microsoft needs to quit breaking stuff
-
Jaykul over 4 yearsYou should definitely not remove the WindowsApps folder from the PATH, you'd be breaking things you haven't even installed yet...
-
Avril Lavigne over 4 yearsMS needs to stop with the bloatware
-
Dr. Essen over 4 yearsThough this is a one kind of solution, This can't help me for my query, please check the "Edit 2" in the question. How to get it fixed via "answer file"!!!
-
Dr. Essen over 4 yearsThis is not related to path at all. I have tried this but doesn't work.
-
bomben almost 4 yearsI just renamed it. I added
__MYNAME
to the path so I might stumble over it if something does not work as expected. Has the same effect. -
hxin almost 4 yearsThanks!! How the world did Windows decide to have added the aliases?!
-
CircleOnCircles over 3 years
Remove-Item $env:USERPROFILE\AppData\Local\Microsoft\WindowsApps\python*.exe
the script for 2 -
Jeremy over 3 yearsI couldn't find the setting mentioned in the top answer, CircleOnCircles's answer worked for me. Thanks!
-
Angshuman Agarwal over 3 yearsMoving the
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
to the end works ! -
Alex Filipovici over 3 yearsAlso applies to version 1909.
-
Albert about 3 yearsMy main problem is if you want the python tools for visual studio then you have to install it with visual studio (Except it says if you install outside of vs then it will be detected) and when you install via vs it adds python to your vs cmd prompt path, not your system path. This of course means typing python from the regular command line will either 1) open the windows store or if you have disabled that, 2) do nothing. Microsoft irks the crap out of me sometimes. Thanks for explaining why the store thign happens btw.
-
Albert about 3 yearsAnd it actually didnt even add it to my vs cmd prompt environment. Geez.
-
Admin about 2 years@AngshumanAgarwal it only works for user installations, a system-wide Python install uses the system path variable which user path takes precedence over, so
WindowsApps
will always come first unless you remove it altogether.