PyO3/pyo3 · error

the configured PyPy interpreter version ({}) is lower than P

Error message

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

What it means

Version check failure in pyo3-ffi's build script (ensure_python_version): the configured PyPy interpreter reports a version below the minimum PyPy version supported by this PyO3 release. The detected config's version tuple fails the lower-bound ensure, aborting the ffi build with a formatted message carrying both versions.

Source

Thrown at pyo3-ffi/build.rs:118

                        .is_none_or(|os_str| os_str != "1")
                {
                    error.add_help("set PYO3_USE_STABLE_ABI_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI");
                    return Err(error.finish().into());
                }
            }

            if interpreter_config.target_abi().kind().is_free_threaded() {
                ensure!(
                    interpreter_config.target_abi().version() >= MIN_FREE_THREADED_VERSION,
                    "PyO3 does not support the free-threaded build of CPython versions below {}, the selected Python version is {}",
                    MIN_FREE_THREADED_VERSION,
                    interpreter_config.target_abi().version(),
                );
            }
        }
        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,

View on GitHub (pinned to ac9b6899d3)

Solutions

  1. Install a newer PyPy (matching the versions in PyO3's SUPPORTED_VERSIONS_PYPY) and set PYO3_PYTHON to it
  2. Verify with pypy3 --version
  3. Downgrade pyo3 if you must keep the old PyPy
  4. Switch back to CPython if PyPy support is not required

Example fix

// before
PYO3_PYTHON=/opt/pypy3.9/bin/pypy3 cargo build
// after
PYO3_PYTHON=/opt/pypy3.11/bin/pypy3 cargo build
Defensive patterns

Strategy: validation

Validate before calling

import sys
if sys.implementation.name == "pypy":
    v = sys.pypy_version_info[:2]
    assert v >= (3, 10), f"PyPy {v} too old for this pyo3"

Prevention

When it happens

Trigger: Building with PYO3_PYTHON (or auto-detection) pointing at a PyPy interpreter older than the minimum version supported by this PyO3 release.

Common situations: Old PyPy 3.8/3.9 installations; CI runners with stale PyPy; switching from CPython to PyPy without checking PyO3's compatibility table.

Related errors


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