pypa/pip · critical · SystemExit
This version of pip does not support python {} (requires >={
Error message
This version of pip does not support python {} (requires >={}). What it means
Raised when the pip runner shim (__pip-runner__.py) is executed under a Python interpreter whose version is below pip's minimum supported version (currently 3.10, defined by PYTHON_REQUIRES). This is a hard gate at the very top of the runner module, before any pip internals are imported, using only Python 2-compatible syntax so it works on any interpreter. It exits the process via SystemExit rather than a standard exception.
Source
Thrown at src/pip/__pip-runner__.py:20
This file is named as it is, to ensure that this module can't be imported via
an import statement.
"""
# /!\ This version compatibility check section must be Python 2 compatible. /!\
import sys
# Copied from pyproject.toml
PYTHON_REQUIRES = (3, 10)
def version_str(version): # type: ignore
return ".".join(str(v) for v in version)
if sys.version_info[:2] < PYTHON_REQUIRES:
raise SystemExit(
"This version of pip does not support python {} (requires >={}).".format(
version_str(sys.version_info[:2]), version_str(PYTHON_REQUIRES)
)
)
# From here on, we can use Python 3 features, but the syntax must remain
# Python 2 compatible.
import runpy # noqa: E402
from importlib.machinery import PathFinder # noqa: E402
from os.path import dirname # noqa: E402
PIP_SOURCES_ROOT = dirname(dirname(__file__))
class PipImportRedirectingFinder:
@classmethod
def find_spec(self, fullname, path=None, target=None): # type: ignoreView on GitHub (pinned to d7d0d0a394)
Solutions
- Switch to a Python interpreter >= 3.10 (e.g., `python3.10 -m pip ...`).
- If you must use an older Python, install a pip version whose PYTHON_REQUIRES matches (e.g., pip 24.x supports 3.8+).
- Check `python --version` and verify your PATH or virtualenv points to the correct interpreter.
- In CI, update the base image to one shipping Python 3.10+.
Example fix
# before python3.9 -m pip install foo # after python3.10 -m pip install foo
Defensive patterns
Strategy: validation
Validate before calling
import sys
PYTHON_REQUIRES = (3, 10)
if sys.version_info[:2] < PYTHON_REQUIRES:
print(f"Python >={'.'.join(map(str, PYTHON_REQUIRES))} required, got {'.'.join(map(str, sys.version_info[:2]))}")
sys.exit(1) Type guard
def is_python_supported() -> bool:
import sys
return sys.version_info[:2] >= (3, 10) Prevention
- Always check python --version before running pip from source.
- Pin your CI Python image to >= 3.10.
- Use pyenv or a version manager to maintain the minimum supported Python.
When it happens
Trigger: Invoking `python -m pip` (or the embedded __pip-runner__.py) with a Python 3.9 or earlier interpreter. Also triggered when a tool or build system calls `get_runnable_pip()` / the pip runner shim from an older Python, or when a user accidentally runs a modern pip checkout on a legacy interpreter.
Common situations: Running pip from source (development checkout) on a system default Python that is too old. CI images pinned to Python 3.9 or earlier that pull latest pip. Upgrading pip on a system that still has multiple Python versions and invoking the wrong one.
Related errors
- Script {script!r} requires a different Python: {target_pytho
- Package {dist.raw_name!r} requires a different Python: {vers
- Python 3.8 or later is required
- {wheel.filename} is not a supported wheel for this platform.
- {wheel.filename} is not a supported wheel on this platform.
AI-assisted analysis of pypa/pip@d7d0d0a394 (2026-08-04).
Data as JSON: /data/errors/9e0d83d99abdccdf.json.
Report an issue: GitHub.