Recently one user reported that while running a python command using a Windows command prompt it launches Microsoft Store. Usually most of the users after installing python, they used to check the version of python using the command prompt, python version command displays the current installed Python version. But for this user, we have noticed that the command launches the Microsoft store. The Problem is Windows automatically linked the Python command to initiate the installation of Python from the Microsoft Store. If you are facing a similar issue with Python, then this article will guide you to fix Python command open Microsoft Store in Windows 11/10.
Fix Python command open Microsoft store:
This issue occurs due to the Python aliases, when installing Python in Windows 11/10 the Aliases are in the ON position, then during the installation windows automatically adds the Windows apps path in the System Path variable. So when you enter the python command it will open the Microsoft store. Follow the below-mentioned resolution methods to fix this issue.
Solution 1: Check the Python path in Local Path variable:
Open the Run command by pressing Windows + R and type sysdm.cpl and hit enter, this command will open the System Properties Window.
Click on the Advanced tab and Click on Environment Variables.
Under System Variables, click on Path and choose Edit.
Under Edit Environment Variable, Look for the Python path, if you are not able to find the Python path then add the Python path manually.
Note: Add the Python path manually and move the path to the UP in the Local Environment variable.
Solution 2: Disable Python App execution aliases:
Open Windows settings by pressing Windows + I and from the left-hand side choose Apps. And from the right-hand side click on Apps & features.
Under Apps & features, click on More settings, then choose App execution aliases.
Under App execution aliases look for App Installer (python.exe), you can find two or three App Installers, Disable them all.
Mostly this will fix the issue, now reopen the command prompt and type the python command. That’s it.
You can also delete the python.exe from the Windows apps directory, “%USERPROFILE%\AppData\Local\Microsoft\WindowsApps“, but if you don’t have enough permission you’ll receive an error. So it’s better, just turn off the App Installer and get the issue resolved.
Read Also:
Fix nvm you do not have sufficient privilege to perform this operation error in Windows 11/10
How to Reinstall Microsoft Store in Windows 11?
Fix Microsoft Store failing to download apps on Windows 11
Fix Microsoft Store is blocked by IT in Windows 11
Fix “pip not recognized as internal or external command” Error in Windows 11