PyO3/pyo3 · error

the configured GraalPy interpreter version ({}) is lower tha

Error message

the configured GraalPy interpreter version ({}) is lower than PyO3's minimum supported version ({})

What it means

pyo3-ffi's build script enforces a minimum supported GraalPy version. If the configured interpreter is GraalPy and its version is below SUPPORTED_VERSIONS_GRAALPY.min, the build fails during configuration.

Source

Thrown at pyo3-ffi/build.rs:132

            }
        }
        PythonImplementation::PyPy => {
            let versions = SUPPORTED_VERSIONS_PYPY;
            ensure!(
                interpreter_config.target_abi().version() >= versions.min,
                "the configured PyPy interpreter version ({}) is lower than PyO3's minimum supported version ({})",
                interpreter_config.target_abi().version(),
                versions.min,
            );
            // PyO3 does not support abi3, so we cannot offer forward compatibility
            if interpreter_config.target_abi().version() > versions.max {
                let error = MaximumVersionExceeded::new(interpreter_config, versions.max);
                return Err(error.finish().into());
            }
        }
        PythonImplementation::GraalPy => {
            let versions = SUPPORTED_VERSIONS_GRAALPY;
            ensure!(
                interpreter_config.target_abi().version() >= versions.min,
                "the configured GraalPy interpreter version ({}) is lower than PyO3's minimum supported version ({})",
                interpreter_config.target_abi().version(),
                versions.min,
            );
            // GraalPy does not support abi3, so we cannot offer forward compatibility
            if interpreter_config.target_abi().version() > versions.max {
                let error = MaximumVersionExceeded::new(interpreter_config, versions.max);
                return Err(error.finish().into());
            }
        }
        PythonImplementation::RustPython => {}
    }

    if let PythonAbiKind::Stable(abi) = interpreter_config.target_abi().kind() {
        match interpreter_config.target_abi().implementation() {
            PythonImplementation::CPython => match abi {
                StableAbi::Abi3t => {

View on GitHub (pinned to ac9b6899d3)

Solutions

  1. Upgrade GraalPy/GraalVM to a version in PyO3's supported range and set PYO3_PYTHON to it
  2. Check the version with graalpy --version
  3. Downgrade pyo3 if pinned to an older GraalPy
  4. Use CPython instead if GraalPy support is not a requirement

Example fix

// before
PYO3_PYTHON=/opt/graalpy-23.0/bin/graalpy cargo build
// after
PYO3_PYTHON=/opt/graalpy-24.1/bin/graalpy cargo build
Defensive patterns

Strategy: validation

Validate before calling

import sys
if sys.implementation.name == "graalpy":
    # ensure GraalPy release is in pyo3's SUPPORTED_VERSIONS_GRAALPY range
    assert sys.version_info[:2] >= (3, 10), "GraalPy too old for this pyo3"

Prevention

When it happens

Trigger: Building with the interpreter resolved as GraalPy whose version is below the minimum in SUPPORTED_VERSIONS_GRAALPY for this PyO3 release.

Common situations: Older GraalPy releases (e.g. 23.x) used with a recent pyo3; CI images bundling outdated GraalVM; experimenting with GraalPy's Python compatibility layer.

Related errors


AI-assisted analysis of PyO3/pyo3@ac9b6899d3 (2026-09-05). Data as JSON: /api/errors/873f48047cc6ee8a. Report an issue: GitHub.