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

Learn: How to install Jupyter Notebook in Windows 11 or 10 using CMD?

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.

C:\Users\your-user\AppData\Local\Programs\Python\Python311\Scripts\

FAQ

Why does Python Open Windows Store?

Whenever we type Python in PowerShell or CMD, it automatically opens the Windows Microsoft store to help new users easily install the stable version of Python. However, it means you have to turn Off Python’s added shortcut to Store from App Execution Aliases if you are planning to install this programming language manually.

How do I open the Python shell in Windows?

After installing Python, go to the Windows search and type python. This will show an app with its logo to open Python’s Shell. Alternatively, a user can run a command python on CMS or PowerShell.

open the Python shell in Windows

Why is my Python not opening in cmd?

It is not opening in CMD because either Python is not installed on your system or its directory path is not added to the Systems environment variables account.

Related Articles: