Windows Python advice ages unusually fast. The old screenshot-driven routine—download one python-3.x-amd64.exe, tick Add to PATH, and hope the right interpreter wins—now collides with Store aliases, legacy launchers, multiple runtimes, and project tooling. For supported Windows versions, Python’s current recommendation is the Python Install Manager.

Choose the installation route

  • Microsoft Store: Python’s recommended route for most users; installs the same manager distributed through python.org.

  • python.org MSIX: useful when the Store UI is unavailable but MSIX packages are permitted.

  • WinGet: repeatable command-line installation for supported Windows clients.

  • Traditional executable installer: still available for current releases but being phased out; Python says it will stop with Python 3.16.

  • Enterprise/offline deployment: use the manager’s documented MSIX/MSI/offline-index options with administrator policy rather than copying a consumer setup blindly.

Install the Python Manager with WinGet

Terminalpowershell
winget install 9NQ7512CXL7T -e --accept-package-agreements

What this command does

  • winget install asks Windows Package Manager to install the exact Store product selected by -e.

  • 9NQ7512CXL7T is the official Store product identifier documented by Python.

  • --accept-package-agreements accepts the package terms; review organizational policy before scripted deployment.

  • Close and reopen the terminal after installation so command aliases and PATH changes are visible.

Install and select Python runtimes

Terminalpowershell
py list --online
py install 3.14
py list

How runtime management works

  • py list --online shows runtime tags currently offered by the manager; do not hard-code the “latest” patch version into evergreen documentation.

  • py install 3.14 requests the latest available runtime matching that feature-series tag. Choose the version your project supports.

  • py list shows installed runtimes and which one is the default.

  • The manager and runtimes have separate lifecycles: removing the manager does not automatically remove managed runtimes.

Verify which executable actually runs

Terminalpowershell
python --version
py list
where.exe python
python -c "import sys; print(sys.executable); print(sys.version)"

Read all four checks together

  • python --version proves the command launches, but not which file supplied it.

  • where.exe python lists matching executables in search order and exposes stale PATH entries or Store aliases.

  • sys.executable is the interpreter path from inside the running process—the strongest identity check.

  • sys.version includes build/compiler details useful in bug reports. Do not assume python and py select the same runtime until verified.

Create one virtual environment per project

C:\projects\demopowershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip

Why this is the professional default

  • python -m venv .venv creates an isolated interpreter environment using the selected runtime.

  • PowerShell activation prepends the environment’s executable and Scripts directory for the current shell session; it does not globally replace Python.

  • python -m pip binds pip to the verified interpreter and avoids installing through an unrelated pip.exe.

  • Keep .venv out of source control and reproduce dependencies from a lock/requirements file. If policy blocks activation scripts, invoke .venv\Scripts\python.exe directly rather than weakening machine-wide execution policy.

Confirm package installation isolation

Terminalpowershell
python -m pip --version
python -c "import sys; print(sys.prefix); print(sys.base_prefix)"

What the output proves

  • pip --version prints both pip’s version and installation path; that path should belong to .venv.

  • Inside a virtual environment, sys.prefix identifies the environment while sys.base_prefix identifies the base runtime.

  • Different values confirm venv isolation; equal values usually mean the environment is not active.

  • Packages still execute native code with your user permissions—install only trusted names and versions.

Fix “python opens the Microsoft Store” or command conflicts

  • Open Start → Manage app execution aliases and confirm the Python Manager aliases are enabled and consistently assigned. Toggle off stale App Installer aliases when they intercept a separately managed runtime.

  • Ensure %UserProfile%\AppData\Local\Microsoft\WindowsApps remains in the user PATH for manager aliases.

  • If py reports that it cannot open a file, an older Python Launcher may have priority; remove “Python launcher” from Installed apps after confirming it is the conflict.

  • Use where.exe python and where.exe py after every change; guessing at PATH produces fragile systems.

  • Open a new terminal because existing processes retain their original environment.

Administrator rights and system-wide installs

The manager is designed primarily for per-user runtime management and often avoids administrator access. Shared laboratory, CI, classroom, and enterprise installations need deliberate ownership, update, ACL, PATH, and package-cache policy. Python documents py install --target=<shared location> as an advanced building block, not a substitute for endpoint management.

Uninstall without leaving a confusing machine

Terminalpowershell
py uninstall --purge

Risk level: caution. Review the command before running it.

Understand the scope before confirming

  • py uninstall --purge performs the manager’s full runtime cleanup and is destructive to managed Python installations.

  • Back up project code and dependency specifications first; virtual environments are reproducible and should not be treated as source backups.

  • Uninstalling only the Python Install Manager through Installed apps does not remove installed runtimes.

  • After removal, inspect Installed apps, where.exe python, aliases, PATH entries, and project .venv directories separately.

Troubleshooting checklist

  • `python` is not found: reopen the terminal, verify execution aliases and WindowsApps PATH, then run the manager configuration checker.

  • `py` invokes an old launcher: inspect where.exe py and remove the legacy launcher conflict.

  • pip installs to the wrong location: use python -m pip after verifying sys.executable and activating the project environment.

  • Activation is blocked: call .venv\Scripts\python.exe directly; do not broadly disable PowerShell security controls.

  • 32-bit/ARM64 mismatch: choose a runtime matching Windows architecture and native dependencies.

  • A package cannot build: update pip/build tools inside the venv, read the package’s supported Python matrix, and prefer an official wheel when available.

  • Multiple versions disagree: use py list, explicit runtime tags, and per-project virtual environments instead of reordering PATH repeatedly.

Primary references