{"record":{"id":"6bab3422615800e0","repo":"PyO3/pyo3","slug":"at-least-graalpy-version-needed-got","errorCode":null,"errorMessage":"At least GraalPy version {} needed, got {}","messagePattern":"At least GraalPy version (.+?) needed, got (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-build-config/src/impl_.rs","lineNumber":501,"sourceCode":"        let output = run_python_script(interpreter.as_ref(), SCRIPT)?;\n        let map: HashMap<String, String> = parse_script_output(&output);\n\n        ensure!(\n            !map.is_empty(),\n            \"broken Python interpreter: {}\",\n            interpreter.as_ref().display()\n        );\n\n        if let Some(value) = map.get(\"graalpy_major\") {\n            let graalpy_version = PythonVersion {\n                major: value\n                    .parse()\n                    .context(\"failed to parse GraalPy major version\")?,\n                minor: map[\"graalpy_minor\"]\n                    .parse()\n                    .context(\"failed to parse GraalPy minor version\")?,\n            };\n            ensure!(\n                graalpy_version >= MINIMUM_SUPPORTED_VERSION_GRAALPY,\n                \"At least GraalPy version {} needed, got {}\",\n                MINIMUM_SUPPORTED_VERSION_GRAALPY,\n                graalpy_version\n            );\n        };\n\n        let shared = map[\"shared\"].as_str() == \"True\";\n        let python_framework_prefix = map.get(\"python_framework_prefix\").cloned();\n\n        let version = PythonVersion {\n            major: map[\"version_major\"]\n                .parse()\n                .context(\"failed to parse major version\")?,\n            minor: map[\"version_minor\"]\n                .parse()\n                .context(\"failed to parse minor version\")?,\n        };","sourceCodeStart":483,"sourceCodeEnd":519,"githubUrl":"https://github.com/PyO3/pyo3/blob/ac9b6899d348be4d54614d060dea53a645a12e36/pyo3-build-config/src/impl_.rs#L483-L519","documentation":"When the configured interpreter is GraalPy, pyo3 requires at least MINIMUM_SUPPORTED_VERSION_GRAALPY because older GraalPy releases lack needed C-API compatibility. from_interpreter parses graalpy_major/graalpy_minor from the probe output and bails if the detected version is below the floor.","triggerScenarios":"Building against a GraalPy interpreter whose detected (major, minor) version compares less than MINIMUM_SUPPORTED_VERSION_GRAALPY — e.g. pointing PYO3_PYTHON at an old GraalPy install or a GraalPy-based venv pinned to an old version.","commonSituations":"Projects with GraalPy pinned in their lockfile/CI to a release older than pyo3's supported minimum; stale GraalPy installations on dev machines; upgrading pyo3 raises the minimum, suddenly failing previously-working builds.","solutions":["Upgrade GraalPy to at least MINIMUM_SUPPORTED_VERSION_GRAALPY (see pyo3 docs for the exact version for your pyo3 release)","If you cannot upgrade, pin pyo3 to an older release that supports your GraalPy version","Switch the build to a CPython interpreter if GraalPy support is not required"],"exampleFix":"# before\ngu install graalpy && export PYO3_PYTHON=~/graalpy-23.0/bin/graalpy\n# after\n# download GraalPy >= 24.x (check pyo3 docs for the minimum)\nexport PYO3_PYTHON=~/graalpy-24.1/bin/graalpy && cargo build","handlingStrategy":"validation","validationCode":"// shell\nif ${PYO3_PYTHON:-graalpy} -c 'import sys; sys.exit(0 if sys.implementation.name==\"graalpy\" else 1)' 2>/dev/null; then ${PYO3_PYTHON} -c 'import sys; print(\"graalpy version\", sys.version_info[:2])'; fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin GraalPy >= the minimum listed in pyo3's docs for your pyo3 version","When bumping pyo3, re-check interpreter minimums for GraalPy/PyPy","Keep GraalPy installs updated in CI images"],"tags":["rust","pyo3","graalpy","version-check","build-time"],"backgroundTag":"unsupported-python-implementation-version","analyzedSha":"ac9b6899d348be4d54614d060dea53a645a12e36","analyzedAt":"2026-09-05T09:20:35.319Z","contentChangedAt":"2026-09-05T09:20:35.319Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}