How To Run Multiple Python Versions On Windows (2026)
Quick answer
- Use the Python install manager: py list –online 3.15 shows versions you can add, py install 3.15 adds one, py list shows what you have, and py -V:3.15 runs that version for a single command.
- The default runtime is the latest stable release unless you set the PYTHON_MANAGER_DEFAULT environment variable or a default_tag in the configuration file.
- An active virtual environment overrides the default, so activate each project environment instead of switching the global default.
Applies to: Python install manager on Windows, as described in the Python 3.15.2 documentation
This guide is for anyone who needs two or more Python versions on one Windows PC, for example because an older project needs a different release than a new one.
The Python install manager is built for this, because it keeps several runtimes side by side and lets you pick one with a short flag.
The commands below come from the official “Using Python on Windows” documentation page, read on November 29, 2026.
Table of Contents
- Quick answer: the commands you need
- Step 1: list what you already have
- Step 2: install another version
- Step 3: run a specific version
- Change which version is the default
- Why the wrong version starts
- Use virtual environments per project
- Pick a version inside a script
- Remove a version you no longer need
- Source
- More Windows guides
Quick answer: the commands you need
| Task | Command |
|---|---|
| See what is installed and the default | py list |
| See versions you can install | py list --online 3.15 |
| Install another version | py install 3.15 |
| Run a specific version | py -V:3.15 my-script.py |
| Remove one version | py uninstall <TAG> |
These work only after the install manager is on the PC, so if python or py is not found, start with our guide to fixing Python not recognized on Windows.
Step 1: list what you already have
py listThis shows the runtimes the manager can find, and the documentation says it also shows which one is your default.
Useful options on the same command are listed below.
| Option | What the documentation says |
|---|---|
--one or -1 | Shows the single best result |
--only-managed | Leaves out runtimes the manager did not install |
--online | Searches the online index for runtimes you can install |
-f or --format | Sets the output format, such as table, csv or json |
Step 2: install another version
First search the online index, using the example form from the documentation.
py list --online 3.15Then install the tag you want, using the documented form py install <TAG>.
py install 3.15The documentation shows other tags as examples, such as 3.15t for the free-threaded build, and says PythonCore is the recommended standard CPython variant.
Run py list --online yourself for the tags available today, because the examples on the page are for version 3.15.
Two install options help when you repeat the command.
--updatereplaces an install only if the new version is newer, and with no tags it updates every managed install.--forceignores cached files and replaces an existing install.
Step 3: run a specific version
Put the version flag before everything else on the command line.
py -V:3.15 my-script.pyThe documentation says the -V:<TAG> flag must come before any other option.
It adds that the V: part may be omitted when the tag refers to an official release and starts with 3, for compatibility.
The same flag works with other tag forms shown on the page, such as py -V:3-arm64 for an ARM build.
Change which version is the default
With no flag, py and python use the default runtime, which is the latest stable release unless you configured otherwise.
The documentation gives two ways to change that.
| Method | Where |
|---|---|
| Environment variable | PYTHON_MANAGER_DEFAULT |
| Configuration file | The default_tag setting, in the user file %AppData%\Python\pymanager.json |
You can set the environment variable from Start by searching for Edit environment variables for your account, as in our guide to editing environment variables in Windows 11.
Run py list again afterwards to confirm the default changed.
Why the wrong version starts
The documentation explains two rules that surprise people with several installs.
- Managed installs, the ones added with py install, are chosen ahead of unmanaged ones.
- Unmanaged prereleases may be chosen ahead of stable releases.
Its fix is to use py install for the version you want, or to set your default tag, or to uninstall the prerelease and reinstall with py install.
Use virtual environments per project
The documentation recommends a virtual environment for each project, created with the command below.
python -m venv <env path>Activate it with <env>\Scripts\Activate, and the page says that when no version is requested an active virtual environment becomes the default runtime.
This is often easier than changing the global default, because each project keeps the version it was created with.
Pick a version inside a script
The documentation says the manager reads a shebang line at the top of a script, such as the one below, and launches the matching runtime.
#! /usr/bin/pythonIt warns that shebang handling is subtly different from the older py.exe launcher, and that the old py.ini options no longer apply.
That is a reason to move version choices into the default tag or the -V: flag rather than old launcher settings.
Remove a version you no longer need
py uninstall <TAG>For removing everything, see our guide to uninstalling Python completely on Windows.
Source
More Windows guides
- How To Run Windows Memory Diagnostic (2026)
- Windows 11 New Search And Run Dialog: How To Get Them (2026)
- How To Open The Run Dialog In Windows 11 (2026)
- How To Run SFC And DISM In Windows 11 (2026)
- How To Set Up Windows Sandbox In Windows 11 (2026)
- How To Stop Windows 10 Updates: Pause, Block Or Turn Off
See all: Windows 11 Guides