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

Why Does Typing 'python' in CMD Open the Windows Store Instead of Running Python?

Mary-Kate Olsen
Release: 2024-11-28 05:40:15
Original
789 people have browsed it

Why Does Typing

CMD Directs to Windows Store Upon Typing 'python'

Issue:
When attempting to run Python code in Sublime Text 3, an error message indicates that Python is not found and suggests downloading it from the Microsoft Store. Typing 'python' in CMD prompts the opening of Windows Store to download Python 3.7. This issue has emerged without discernible cause despite reinstalling Python and verifying the correct path environment variable.

Solution:
Modifying App Execution Aliases

  1. Utilize the Windows search bar to locate "Manage app execution aliases."
  2. Identify the two aliases for Python.
  3. Unselect both aliases to enable the traditional "python" and "python3" aliases.

Windows aliases place unoccupied or simulated "python.exe" and "python3.exe" files in "%USERPROFILE%AppDataLocalMicrosoftWindowsApps." Following a fresh Windows installation, these aliases are typically enabled, placing the alias directory at the forefront of the "Path" environment variable.

When executing "python" in cmd, the directories listed in "Path" are checked sequentially. If Python is installed after a new Windows 10 installation, the alias python.exe in the App Execution Alias directory will be detected first debido to its high position in "Path."

Disabling the "python.exe" and "python3.exe" aliases eliminates the simulated EXE files and resolves the issue.

The above is the detailed content of Why Does Typing 'python' in CMD Open the Windows Store Instead of Running 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