Home > Backend Development > Python Tutorial > Why Does CMD Open Windows Store When I Type 'Python'?

Why Does CMD Open Windows Store When I Type 'Python'?

Patricia Arquette
Release: 2024-11-17 20:48:02
Original
1070 people have browsed it

Why Does CMD Open Windows Store When I Type 'Python'?

CMD Opens Windows Store When Typing 'Python': Solution Revealed

Unable to run Python scripts? When attempting to execute Python code in Sublime Text 3, users encounter an error stating that Python is not found and can be installed from the Microsoft Store. Typing "python" in CMD also redirects them to the Windows Store to download Python 3.7, a baffling issue that has plagued many users.

To solve this dilemma, navigate to the Windows search bar and search for "Manage app execution aliases." You will find two aliases for Python. Unselect them, which will restore the standard "python" and "python3" aliases.

This issue arises when Python is installed on a new Windows system. During the installation process, empty files named "python.exe" and "python3.exe" are placed in the "%USERPROFILE%AppDataLocalMicrosoftWindowsApps" directory. These alias files are prioritized in the "Path" environment variables, resulting in CMD directing users to the Windows Store.

Alternatively, you can use DOSKEY to create a new alias for Python. You can also delete the alias files by navigating to the "%USERPROFILE%AppDataLocalMicrosoftWindowsApps" directory and deleting "python.exe" and "python3.exe." However, this may break other apps that utilize execution aliases.

The App Execution Aliases provide a solution to this issue, allowing users to disable the alias files. This prevents the generation of empty "python.exe" and "python3.exe" files. Microsoft has stated that this system was designed to simplify Python installation for children learning the language in school.

If you encounter this issue, unchecking the App Execution Aliases for "python.exe" and "python3.exe" is the most straightforward solution.

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

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template