Python open windows store

Fix Python Command Launches Microsoft Store in Windows 10

So on the latest version of Windows 10, I faced an issue after installing Python 3.9 64-bit. After installing Python, I added its path to the system PATH variable. But when I tried to run Python from the cmd.exe console, it launched Microsoft Store instead.

At first I thought that I had accidentally launched Microsoft Store by mistake. So I tried again, but Microsoft Store was launched once again. Finally, I realized that running the python command is actually launching the Microsoft Store.

Fortunately, fix for this problem is very easy. Windows has linked Python command to initiate installation of Python from the Microsoft store in the hope that it will help users install Python easily. They actually give step-by-step instructions on installing Python from Microsoft Store. But it gives a big headache to the rest of the users who directly download it from the official Python website.

Here is how you can fix this problem very easily:

  1. Open Windows Settings by clicking on Start and then on the small cogwheel icon. Alternatively, you can also use the hotkey Win+I.
  2. In the Windows Settings, select Apps category.Python Launches Microsoft Store
  3. Under the Apps category, select Apps & Features and then click on App execution aliases.Python Launches Microsoft Store
  4. You will find three app execution aliases for Python related executables – Python.exe, Python3.exe and Python3.7.exe. Disable them all. Python Launches Microsoft Store
  5. This is it, you have fixed the problem. Now you can give the python.exe command and it will run Python interpreter.Python Launches Microsoft Store
Читайте также:  Computer science center java

Microsoft has added these aliases for Python in the good faith that it will help the beginners install Python and other development tools very easily from the Microsoft Store. But if this gives you trouble just because you prefer the latest version of Python downloaded fresh from the official Python website, then you can quickly use the above steps to disable these aliases and fix the problem very easily.

Источник

Fix Python command open Microsoft store in Windows 11/10

Python command open Microsoft store

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.

Local environment variables

Under System Variables, click on Path and choose Edit.

system path variables

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 .

Add Python path-Python command open Microsoft store

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.

App execution aliases-Python command open Microsoft store

Under App execution aliases look for App Installer (python.exe), you can find two or three App Installers, Disable them all.

Delete app execution aliases-Python command open Microsoft store

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.

Источник

How to Stop Python from opening the Microsoft store?

When we type Python in the command prompt or Powershell (Terminal), it automatically opens the Microsoft store. Now, how to stop it if you want to use your downloaded version of Python rather than the one available on the store to install. In this tutorial, we learn that.

Recently, I wanted to install the latest available Python version, 3.12, on Windows. However, after installing, whenever I tried to access Python using the CMD or Powershell Terminal, it kept opening the Microsoft store to install Python’s 3.10 version, which was available there. It is because of the Manage App Execution Aliases feature of Windows 11.

In it, by default, it is set by the system to open the MS App store if anyone types Python or python3 on Terminal and the system can’t find it on the local PC.

To stop this, we need to turn off the Manage App Execution Aliases function for Python. Here are the steps to follow:

Turn off the Manage App Execution Aliases for Python

Estimated reading time: 5 minutes

  1. On your Windows 10 or 11, either click the Start button or the Search icon.
  1. Type – Manage App Execution Aliases to search for this Windows feature.
  1. Soon you will see it in the search result; click on it.

Manage App Execution Aliases

  1. Scroll down and find the “Python3” and “Python” App Installer options.
  1. To stop the Python command from opening the Microsoft store, turn off the toggle button given in front of them.

Stop Python from opening the Microsoft store

  1. Now, close your CMD Terminal or Powershell and reopen it again.
  1. Type the python command to check whether it has stopped redirecting to MS Store.

Check python and PIP version

Note: If you get ‘python‘ is not recognized as an internal or external command, operable program, or batch file error, then you must manually add your Python installation directory location path to system environment variables.

  • Go to Windows 11 or 10 Search
  • Type- system variables and click on the Edit the system environment variables option.

Open Edit the system environment vairables

  • System Properties will open; click on the “Environment Variables” button.

Windows 11 Environment Variables

  • Click on Edit, then New. After that, click on the browse button to find the folder of Python you have installed:

Add Python to Windows 11 path

Note – The typical path for manually installed Python files can be found under the AppData directory. It is inside your User folder; by default, it is hidden, so don’t forget to change the file attribute. Change your user with the name of the user in your Windows system, whereas Python311 is the version and can be different in your case.

Источник

Оцените статью