apache/beam · warning

You are using version

Error message

You are using version {0} of pip. However, the recommended min version is {1}.

What it means

Apache Beam's Python setup.py checks the installed pip version at install time and emits a UserWarning if it is below the recommended minimum (19.3.0). This is not a fatal error; the build continues, but older pip may mishandle modern build isolation, extras, or dependency resolution during installation.

Solutions

  1. Upgrade pip before installing: python -m pip install --upgrade pip (need >= 19.3.0).
  2. If pip cannot be upgraded system-wide, use a fresh virtualenv/venv which ships a recent pip.
  3. Suppress the warning only if the old pip is intentional: python -W ignore setup.py ... — but expect possible dependency-resolution issues.

Example fix

// before
$ pip install apache-beam   # pip 9.x -> warning
// after
$ python -m pip install --upgrade pip
$ pip install apache-beam
Defensive patterns

Strategy: validation

Validate before calling

import subprocess, sys
v = subprocess.run([sys.executable, '-m', 'pip', '--version'], capture_output=True, text=True).stdout
ver = tuple(int(x) for x in v.split()[1].split('.')[:2])
if ver < (19, 3):
    raise SystemExit('Upgrade pip: python -m pip install --upgrade pip')

Prevention

When it happens

Trigger: Running 'pip install apache-beam' (or 'python setup.py install/develop') in an environment where distribution('pip').version parses to a version less than 19.3.0, i.e. pip older than 19.3.0.

Common situations: Old system Python (e.g. CentOS/Ubuntu system pip) with a stale pip; air-gapped or locked-down CI images that never upgrade pip; virtualenvs created by old virtualenv/venv tooling that bundle ancient pip.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/98d445e79afdd5bd. Report an issue: GitHub.

Appendix: source

Thrown at sdks/python/setup.py:105

      global_names
  )
  return global_names['__version__']


PACKAGE_NAME = 'apache-beam'
PACKAGE_VERSION = get_version()
PACKAGE_DESCRIPTION = 'Apache Beam SDK for Python'
PACKAGE_URL = 'https://beam.apache.org'
PACKAGE_DOWNLOAD_URL = 'https://pypi.python.org/pypi/apache-beam'
PACKAGE_AUTHOR = 'Apache Software Foundation'
PACKAGE_EMAIL = 'dev@beam.apache.org'
PACKAGE_KEYWORDS = 'apache beam'

RECOMMENDED_MIN_PIP_VERSION = '19.3.0'
try:
  _PIP_VERSION = distribution('pip').version
  if parse(_PIP_VERSION) < parse(RECOMMENDED_MIN_PIP_VERSION):
    warnings.warn(
        "You are using version {0} of pip. " \
        "However, the recommended min version is {1}.".format(
            _PIP_VERSION, RECOMMENDED_MIN_PIP_VERSION
        )
    )
except PackageNotFoundError:
  # Do nothing if pip is not found. This can happen when using `Poetry` or
  # `pipenv` package managers.
  pass

REQUIRED_CYTHON_VERSION = '3.0.0'
try:
  _CYTHON_VERSION = distribution('cython').version
  if parse(_CYTHON_VERSION) < parse(REQUIRED_CYTHON_VERSION):
    warnings.warn(
        "You are using version {0} of cython. " \
        "However, version {1} is recommended.".format(
            _CYTHON_VERSION, REQUIRED_CYTHON_VERSION

View on GitHub (pinned to 12126d8942)