{"record":{"id":"3aa15abcc79897c8","repo":"apache/beam","slug":"dataflow-runner-currently-supports-python-versions-s-got-s-s","errorCode":null,"errorMessage":"Dataflow runner currently supports Python versions %s, got %s.%s.\nTo ignore this requirement and start a job using an unsupported version of Python interpreter, pass --experiment use_unsupported_python_version pipeline option.","messagePattern":"Dataflow runner currently supports Python versions (.+?), got (.+?)\\.(.+?)\\.\nTo ignore this requirement and start a job using an unsupported version of Python interpreter, pass --experiment use_unsupported_python_version pipeline option\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/dataflow/internal/apiclient.py","lineNumber":1266,"sourceCode":"def get_response_encoding():\n  \"\"\"Encoding to use to decode HTTP response from Google APIs.\"\"\"\n  return 'utf8'\n\n\ndef _verify_interpreter_version_is_supported(pipeline_options):\n  if ('%s.%s' % (sys.version_info[0], sys.version_info[1])\n      in _PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW):\n    return\n\n  if 'dev' in beam_version.__version__:\n    return\n\n  debug_options = pipeline_options.view_as(DebugOptions)\n  if (debug_options.experiments and\n      'use_unsupported_python_version' in debug_options.experiments):\n    return\n\n  raise Exception(\n      'Dataflow runner currently supports Python versions %s, got %s.%s.\\n'\n      'To ignore this requirement and start a job '\n      'using an unsupported version of Python interpreter, pass '\n      '--experiment use_unsupported_python_version pipeline option.' % (\n          _PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW,\n          sys.version_info[0],\n          sys.version_info[1]))\n","sourceCodeStart":1248,"sourceCodeEnd":1274,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py#L1248-L1274","documentation":"Raised when a pipeline is submitted to Dataflow with a Python interpreter version not in _PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW. The check runs during client initialization (via __init__), and an escape hatch is offered: the use_unsupported_python_version experiment. This prevents launching jobs whose worker harness image may not exist for that Python version.","triggerScenarios":"Running Pipeline.run() with DataflowRunner using e.g. a too-new Python (3.14) or an EOL version the Dataflow service no longer supports, without the bypass experiment flag.","commonSituations":"Local venv upgraded to a new Python release before Beam/Dataflow added support; CI images bumping Python; following Beam docs that lag behind a new Python release.","solutions":["Run the pipeline with a supported Python interpreter, e.g. create a venv with python3.11.","Pin the CI/venv Python to a version in _PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW for the installed Beam release.","If you accept the risk, add --experiment=use_unsupported_python_version to pipeline options.","Upgrade or downgrade the apache-beam package to a release that supports your Python version."],"exampleFix":"// before\npython3.14 -m my_pipeline --runner DataflowRunner\n// after\npython3.11 -m my_pipeline --runner DataflowRunner\n# or, deliberately bypass:\n# --experiment=use_unsupported_python_version","handlingStrategy":"validation","validationCode":"import sys\nSUPPORTED = {(3, 9), (3, 10), (3, 11), (3, 12)}\nif (sys.version_info[0], sys.version_info[1]) not in SUPPORTED and \\\n   'use_unsupported_python_version' not in (debug_options.experiments or []):\n    sys.exit('Unsupported Python for Dataflow: use a supported interpreter')","typeGuard":null,"tryCatchPattern":"try:\n    client = DataflowApplicationClient(pipeline_options)\nexcept Exception as e:\n    if 'supports Python versions' in str(e):\n        sys.exit('Re-run with a supported pythonX.Y interpreter')\n    raise","preventionTips":["Pin the CI/venv Python version to one supported by your apache-beam release.","Check Beam's supported Python matrix before upgrading local Python.","Prefer upgrading apache-beam over using the bypass experiment."],"tags":["python","apache-beam","dataflow","version-compatibility"],"backgroundTag":"unsupported-platform","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}