PyO3/pyo3 · error
unsupported Python interpreter
Error message
unsupported Python interpreter
What it means
Sentinel error from PythonImplementation::from_soabi: the SOABI string read from sysconfigdata did not start with any recognized prefix (cpython/pypy/graalpy), so the interpreter implementation could not be identified. The faulty input is the SOABI value itself — empty, mangled, or from an unsupported runtime.
Source
Thrown at pyo3-build-config/src/impl_.rs:1494
PyPy,
GraalPy,
RustPython,
}
impl PythonImplementation {
fn is_pypy(self) -> bool {
self == PythonImplementation::PyPy
}
fn from_soabi(soabi: &str) -> Result<Self> {
if soabi.starts_with("pypy") {
Ok(PythonImplementation::PyPy)
} else if soabi.starts_with("cpython") {
Ok(PythonImplementation::CPython)
} else if soabi.starts_with("graalpy") {
Ok(PythonImplementation::GraalPy)
} else {
bail!("unsupported Python interpreter");
}
}
}
impl Display for PythonImplementation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
PythonImplementation::CPython => write!(f, "CPython"),
PythonImplementation::PyPy => write!(f, "PyPy"),
PythonImplementation::GraalPy => write!(f, "GraalVM"),
PythonImplementation::RustPython => write!(f, "RustPython"),
}
}
}
impl FromStr for PythonImplementation {
type Err = Error;
fn from_str(s: &str) -> Result<Self> {View on GitHub (pinned to ac9b6899d3)
Solutions
- Check the SOABI entry in the _sysconfigdata file for corruption or truncation
- Use a CPython, PyPy, or GraalPy target whose SOABI starts with a known prefix
- Set PYO3_CROSS_PYTHON_IMPLEMENTATION explicitly so the build does not have to infer it from SOABI
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pyo3-build-config/src/impl_.rs:1494 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of PyO3/pyo3@ac9b6899d3 (2026-09-05).
Data as JSON: /api/errors/a851aeed333ae598.
Report an issue: GitHub.