The Windows Python Install Manager handles installing and selecting Python runtimes, especially when a computer needs more than one version.
Understanding the Concept
The modern manager provides py, python, and pymanager commands when installed and correctly aliased. py list reports available runtimes; py install 3.15 installs the 3.15 branch; py -V:3.15 selects it for execution. The behavior of an unqualified python command depends on the configured default, active environment, and other installations. Microsoft Store app execution aliases and a legacy launcher can affect command resolution.
When and Why You Would Use This
For course exercises, selecting Python explicitly prevents silent fallback to 3.14 or another version. In a project virtual environment, python should normally resolve to that environment.
Practical Example
py list
py install 3.15
py -V:3.15 --version
py -V:3.15 -m venv .venv
Understanding the Example
Run these in Windows Terminal, PowerShell, or Command Prompt. The final command creates a project virtual environment in the current folder. It should be executed from your project, not a protected system directory.
Try It Yourself
Run py list and identify exactly which entry represents Python. Note any other installed versions.
Common Beginner Mistakes
- Using an old
pyexecutable without realizing it may be the legacy launcher. - Assuming
pythonwill always mean 3.15 if multiple versions are installed. - Running the venv creation command in an unrelated directory.
Key Takeaways
- The Install Manager can list, install, and select Python runtimes.
- Use explicit version selection when a course requires 3.15.
- A virtual environment provides a stable interpreter for a project.