pypa/pip · critical · SystemExit
This version of pip does not support python
Error message
This version of pip does not support python {} (requires >={}). What it means
Raised as a SystemExit from pip's internal runner module (__pip-runner__.py) when pip is re-invoked under a target interpreter (via `pip --python <exe>`) whose version is below the minimum pip supports (currently 3.10, copied from pyproject.toml's PYTHON_REQUIRES at line 12). The check at line 19 compares sys.version_info[:2] against PYTHON_REQUIRES before any pip logic runs. It exists so that running modern pip under an ancient Python fails fast with a clear message instead of cryptic syntax/import errors.
Solutions
- Point --python at an interpreter that is Python 3.10 or newer (e.g. `pip --python python3.11 install <pkg>`).
- If you must target an older Python, downgrade pip to a version that still supports it (the last pip supporting 3.8 is pip 24.0; 3.9 support ended with pip 24.1).
- Remove the --python flag entirely so pip runs under its own current interpreter and uses cross-platform flags (--platform/--python-version) for targeting instead.
Example fix
# before pip install --python /usr/bin/python3.9 requests # after pip install --python /usr/bin/python3.11 requests
Defensive patterns
Strategy: validation
Validate before calling
# Before re-invoking pip under a target interpreter, verify it meets pip's minimum.
import subprocess, sys
MIN = (3, 10)
path = "/usr/bin/python3.9"
out = subprocess.check_output([path, "-c", "import sys; print(sys.version_info[:2])"], text=True)
v = eval(out)
if v < MIN:
print(f"pip requires Python >={MIN[0]}.{MIN[1]}, found {v[0]}.{v[1]}"); sys.exit(1) Prevention
- Pin your CI Python versions to >= the minimum pip supports (currently 3.10).
- When using pip --python, validate the target interpreter version before invoking pip.
When it happens
Trigger: Invoking `pip install --python /usr/bin/python3.9 <pkg>` (or any subcommand with --python) where the named interpreter reports a version older than 3.10. The __pip-runner__.py module is executed by that target interpreter, which then triggers the guard at line 19-24.
Common situations: Building for or targeting a legacy Python (3.8/3.9) after upgrading pip to a version that dropped support for it; CI matrices that still install old Python but use a shared new pip; system-managed pip on a host where python3 points to an old interpreter.
Related errors
- Cannot restore Requirement from
- is not a supported wheel on this platform.
- Package requires a different Python: not in
- pylock version is not supported
- Python 3.8 or later is required
AI-assisted analysis of pypa/pip@f399c37189 (2026-08-08).
Data as JSON: /api/errors/9e0d83d99abdccdf.
Report an issue: GitHub.
Appendix: 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 f399c37189)