Do not uninstall your system Python to satisfy one project. Use a separate interpreter and project environment. Python 3.9 reached end of life on October 31, 2025; first check whether the project can move to a supported Python release.
If a legacy project still requires 3.9
- Confirm the requirement in the project’s dependency files and documentation.
- Keep the current system interpreter intact. Obtain the required interpreter through a trusted installation method appropriate to your OS.
- Create a new environment with that interpreter. A virtual environment uses an existing interpreter; it does not download or downgrade Python for you.
On macOS/Linux, if python3.9 is already installed:
python3.9 -m venv .venv39
.venv39/bin/python --version
.venv39/bin/python -m pip install -r requirements.txtOn Windows, if the py launcher recognizes an installed 3.9 interpreter:
py -3.9 -m venv .venv39
.\.venv39\Scripts\python.exe --version
.\.venv39\Scripts\python.exe -m pip install -r requirements.txtUse a new folder name and the project’s actual requirements file. Calling the environment’s interpreter directly avoids changing your shell’s default Python.
Validate and plan the upgrade
Run the project’s tests in that environment. A virtual environment separates packages, but it does not turn an unsupported interpreter into a supported one or sandbox untrusted code. Plan a dependency upgrade rather than adopting 3.9 for new development.
If the wrong script or input file runs after switching environments, check Python file paths and which interpreter your terminal is using.
Sources and verification
Support status and environment commands checked against Python documentation. A Python 3.9 installation was not created for this revision.
