Fix : CMD opens Windows app store when I type python

Published: 11 April 2021
on channel: Bytive
17,650
318

#fix #python #cmd #window #store
Use the Windows search bar to find "Manage app execution aliases". There should be two aliases for python, unselect them, this will allow the usual python aliases "python" and "python3".
https://i.stack.imgur.com/eDPFY.png

I think we have this problem when installing python because in a new Windows installation the aliases are in the ON position as in the image below. When turned on, Windows puts an empty or fake file named python.exe and python3.exe in the directory named %USERPROFILE%\AppData\Local\Microsoft\WindowsApps. This is the alias.

https://i.stack.imgur.com/UCwkU.png

Then Microsoft put that directory at the top of the list in the "Path" environment variables.

https://i.stack.imgur.com/iTeHL.png

When you enter "python" in cmd, it searches the directories listed in your "Path" environment variables page from top to bottom. So if you installed Python after a new Windows 10 install then get redirected to the Windows Store it's because there are two python.exe's, the alias in the App Execution Alias page, and the real one wherever you installed Python but cmd finds the App execution alias python.exe first because that directory is at the top of the Path.

I think the easiest solution is to just check the python.exe and python3.exe to OFF as I suggested before, which deletes the fake exe's. Based on this Microsoft Devblog https://devblogs.microsoft.com/python... they stated they created this system partially for new python users specifically kids learning python in school that had trouble installing it. Creating this alias was to helps kids just starting python install it and focus on learning to code. I think Windows probably deletes those aliases if you install Python from the Windows App Store. What we are noticing is that they do not get deleted if you manually install from another source.


Watch video Fix : CMD opens Windows app store when I type python online without registration, duration hours minute second in high quality. This video was added by user Bytive 11 April 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 17,650 once and liked it 318 people.