{"record":{"id":"13b1cab7a60f0a20","repo":"PyO3/pyo3","slug":"cannot-set-a-minimum-python-version-higher-than-13b1ca","errorCode":null,"errorMessage":"cannot set a minimum Python version {} higher than the interpreter version {} (the minimum Python version is implied by the {}-py3{} feature)","messagePattern":"cannot set a minimum Python version (.+?) higher than the interpreter version (.+?) \\(the minimum Python version is implied by the (.+?)-py3(.+?) feature\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-build-config/src/impl_.rs","lineNumber":1043,"sourceCode":"}\n\nimpl PythonAbi {\n    /// Constructs the ABI to target for an interpreter of `version`, given the\n    /// stable ABI kind and minimum Python version to target, if any.\n    ///\n    /// Callers decide whether a stable ABI applies to the interpreter; this\n    /// does not consult the `abi3`/`abi3t` cargo features. The minimum version\n    /// must not exceed the interpreter version. Without a stable ABI the\n    /// result is version-specific, free-threaded when `gil_disabled` is set.\n    pub fn from_stable_abi(\n        implementation: PythonImplementation,\n        version: PythonVersion,\n        stable_abi: Option<(StableAbi, PythonVersion)>,\n        gil_disabled: bool,\n    ) -> Result<PythonAbi> {\n        let builder = match stable_abi {\n            Some((kind, min_version)) => {\n                ensure!(\n                    min_version <= version,\n                    \"cannot set a minimum Python version {} higher than the interpreter version {} \\\n                     (the minimum Python version is implied by the {}-py3{} feature)\",\n                    min_version,\n                    version,\n                    kind,\n                    min_version.minor\n                );\n                PythonAbiBuilder::new(implementation, min_version).stable_abi(kind)\n            }\n            None if gil_disabled => PythonAbiBuilder::new(implementation, version).free_threaded(),\n            None => PythonAbiBuilder::new(implementation, version),\n        };\n        builder.finalize()\n    }\n\n    /// Constructs the ABI to target for an interpreter of `version` from the\n    /// enabled cargo features.","sourceCodeStart":1025,"sourceCodeEnd":1061,"githubUrl":"https://github.com/PyO3/pyo3/blob/ac9b6899d348be4d54614d060dea53a645a12e36/pyo3-build-config/src/impl_.rs#L1025-L1061","documentation":"Consistency error in PythonAbi::from_stable_abi: the caller-supplied minimum Python version (implied by the chosen py3x cargo feature, e.g. the '8' in pyo3/py38) is greater than the detected interpreter version. A crate declaring a higher minimum than the interpreter it is being built against cannot be satisfied.","triggerScenarios":"Thrown at pyo3-build-config/src/impl_.rs:1043 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Lower the minimum-version cargo feature (e.g. py38 instead of py312) so it does not exceed the interpreter","Upgrade the target Python interpreter to at least the declared minimum","Check PYO3_CROSS_PYTHON_VERSION for a stale or wrong value pinning an older interpreter"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}