Home / Fixes / Python Fixes / Installation, PATH & Commands / How to install a specific Python version
Python Installation Guide

How to install a specific Python version

Install the Python release your project actually requires, verify the exact interpreter, and create an environment that stays pinned to it.

Python 3.11–3.14WindowsmacOSLinuxVersion-specific setup

Install the version your project requires — not automatically the newest one

A project may require Python 3.11 while your PC already has Python 3.14, or a course may specify Python 3.12 because its packages were tested there. Installing a specific version is normal and does not require deleting your newer interpreter.

Prefer a currently supported release whenever you control the project. Only install an older unsupported Python version when you have a real compatibility requirement and understand the security trade-off.

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

Install a specific Python version with the current manager

First inspect what can be installed. The current manager supports online listing by version tag:

py list --online 3.13 py list --online 3.12

Then install the required tag:

py install 3.13 py install 3.12

For automation, use pymanager install to avoid conflicts with the deprecated launcher.

Launch that version explicitly

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

The version selector prevents PATH order from deciding which interpreter runs.

Major/minor tag versus exact patch version

A tag such as 3.13 selects the matching managed runtime according to the manager's index. If your application must reproduce an exact patch release, check the available tag with py list --online and install the exact version exposed by the source.

Do not hard-code an exact patch version simply because it appears in an old tutorial. First confirm that it is still available and that your dependency actually requires that exact patch.

macOS and Linux

Use pyenv when you frequently switch versions

On macOS and Linux, pyenv is designed for installing and selecting multiple Python versions without replacing the operating system's Python. After installing pyenv and its build dependencies according to the project documentation:

pyenv install -l pyenv install 3.12.11 pyenv local 3.12.11 python --version

pyenv local writes a project-specific version selection so entering that directory automatically chooses the intended interpreter.

For a one-off installation, your operating system package manager or the official Python.org macOS installer may be simpler. Avoid replacing a Linux distribution's system Python just to satisfy one project.

Create a virtual environment from the chosen interpreter

Installing the right Python version is only half the job. Create the environment using that interpreter so the project does not silently fall back to another one.

Windows

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

pyenv on macOS/Linux

pyenv local 3.12.11 python -m venv .venv source .venv/bin/activate python --version

Keep pip attached to the same Python version

A bare pip command can come from a different installation. Tie package operations to the interpreter:

py -V:3.12 -m pip --version py -V:3.12 -m pip install package-name

Inside an activated virtual environment, python -m pip is usually the clearest form.

Verify before installing project dependencies

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

On Windows with multiple versions, also run:

py list py -V:3.12 -c "import sys; print(sys.executable)"

Frequently asked questions

Can I install Python 3.12 if Python 3.14 is already installed?

Yes. Multiple Python versions can coexist. Use an explicit version selector or project environment so the intended interpreter is used.

Should I uninstall the newer Python version first?

Usually no. Removing a working runtime can break other projects. Install the required version alongside it.

How do I make a project use one Python version?

Create its virtual environment from the intended interpreter, or use a version manager such as pyenv on supported platforms.

References

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