Home / Fixes / Python Fixes / Installation, PATH & Commands / How to install and manage multiple Python versions
Python Installation Guide

How to install and manage multiple Python versions

Keep several Python releases on one machine without PATH chaos. Install, select and verify the correct interpreter for each project.

Multiple versionsWindows py managerpyenvvenvVS Code

Multiple Python versions are normal — the key is selecting them deliberately

You might keep Python 3.11 for a legacy application, Python 3.13 for a production service and Python 3.14 for new experiments. The problem is not having several runtimes. Problems start when python, pip, VS Code and your virtual environment silently point to different ones.

Treat each project as owning a virtual environment created from a known base interpreter. Do not solve every version conflict by editing PATH.

GoalWorking Python setup
StyleStep-by-step
RiskLow when verified
Windows 11 and Windows 10

Install multiple versions with the Python Install Manager

The current Windows documentation specifically recommends py for scenarios involving multiple runtimes. Install each required tag:

py install 3.14 3.13 3.12

Then list the runtimes known to the manager:

py list

The list identifies the available versions and which one is currently the default.

Run a specific Windows version without changing PATH

py -V:3.14 --version py -V:3.13 --version py -V:3.12 --version

Use the same selector when running a script:

py -V:3.12 app.py

This is more predictable than moving Python directories up and down PATH every time you change projects.

Understand the default Python on Windows

With the current manager, python normally launches the selected default runtime, while py can explicitly choose a version. The default can be influenced by Python Install Manager configuration such as the default_tag setting.

If python and py disagree, check for unmanaged Python installations, old PATH entries, App Execution Aliases and the deprecated launcher before changing anything else.

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

Create one virtual environment per project and Python version

Virtual environments capture the base interpreter used at creation time. Create them explicitly:

py -V:3.12 -m venv .venv .venv\Scripts\activate python --version

For a second project that needs Python 3.14:

py -V:3.14 -m venv .venv .venv\Scripts\activate python --version

Do not copy a virtual environment between projects or Python versions. Recreate it from a requirements file or lock file.

macOS and Linux

Manage multiple versions with pyenv

pyenv provides per-user and per-project version selection. After pyenv is installed correctly for your shell, install the required releases:

pyenv install 3.12.11 pyenv install 3.13.7 pyenv versions

Select one version globally for your user

pyenv global 3.13.7

Select a version only for one project

cd my-project pyenv local 3.12.11 python --version

pyenv stores project selection in a .python-version file, which is much safer than replacing the operating system's Python.

Make more than one pyenv version available at the same time

pyenv can select multiple versions in an ordered list. This is useful for tools that test across interpreters:

pyenv global 3.13.7 3.12.11 pyenv versions

Commands are searched through the selected versions in order, with pyenv shims controlling resolution. For normal application development, a single project-specific version is usually easier to reason about.

Avoid the most common multi-version pip mistake

Never assume a standalone pip executable belongs to the Python you just launched. Check it through the interpreter:

py -V:3.12 -m pip --version py -V:3.13 -m pip --version

Inside a virtual environment:

python -m pip --version python -c "import sys; print(sys.executable)"

Make VS Code use the same interpreter as the terminal

Open the project, select the interpreter belonging to that project's .venv, then open a new integrated terminal. Verify it instead of trusting the status bar alone:

python --version python -c "import sys; print(sys.executable)" python -m pip --version

If VS Code still shows another interpreter, remove stale environment selections and choose the project environment again.

Diagnose the wrong-version problem systematically

  1. List installed runtimes.
  2. Print the executable path of the command that is actually running.
  3. Check whether a virtual environment is active.
  4. Check pip through that interpreter.
  5. Only then inspect PATH or aliases.

Windows checklist

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

macOS/Linux with pyenv

pyenv versions pyenv version pyenv which python python -c "import sys; print(sys.executable)"

Frequently asked questions

Can Python 3.12 and 3.14 be installed together?

Yes. Multiple Python versions can coexist. Use explicit version selectors and project virtual environments instead of relying on PATH order.

Which Python version should be the default?

Use the version that best matches your general work, but do not depend on the global default for important projects. Pin each project through its environment.

Does each Python version have its own pip packages?

Each base interpreter has its own package location, and each virtual environment has its own isolated packages. Use python -m pip to confirm which interpreter receives the package.

Should I edit PATH every time I switch Python versions?

No. On Windows use the Python Install Manager version selector; on macOS/Linux use a version manager such as pyenv or project-specific environments.

References

Commands and behavior were checked against current documentation on 8 August 2026. Python installation behavior changes over time, especially on Windows.