Home >Backend Development >Python Tutorial >Why Does Running 'python' in CMD Open the Windows Store?

Why Does Running 'python' in CMD Open the Windows Store?

Susan Sarandon
Susan SarandonOriginal
2024-11-14 16:07:02190browse

Why Does Running

Windows Store Launches When Executing 'python' in CMD

Users have encountered an unexpected issue where typing 'python' in CMD triggers the opening of the Windows Store and prompts them to install Python 3.7. This problem has been observed despite attempts to reinstall Python and ensure a correct Path environment variable configuration.

Solution:

To resolve this issue, navigate to the Windows search bar and search for "Manage app execution aliases." Identify two aliases for Python and unselect them. This action will restore the standard Python aliases "python" and "python3."

This problem arises due to the automatic creation of aliases for Python in a new Windows installation. These aliases redirect users to the Windows Store when accessing Python from the command prompt. Thealiases are located in the directory %USERPROFILE%AppDataLocalMicrosoftWindowsApps.

To prevent this redirection, navigate to App Execution Alias page and disable both Python aliases. This action will remove the fake python.exe and python3.exe files and restore the correct Python executable path in your environment variables.

The above is the detailed content of Why Does Running 'python' in CMD Open the Windows Store?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn