{"record":{"id":"47657584ea756f52","repo":"PyO3/pyo3","slug":"cannot-compile-extensions-for-the-free-threaded-bu","errorCode":null,"errorMessage":"Cannot compile extensions for the free-threaded build on Python versions earlier than 3.13, found {}.{}","messagePattern":"Cannot compile extensions for the free-threaded build on Python versions earlier than 3\\.13, found (.+?)\\.(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-build-config/src/impl_.rs","lineNumber":2438,"sourceCode":"            \"python{}{}_d\",\n            abi.version.major, abi.version.minor\n        ))\n    } else if abi.kind == PythonAbiKind::Stable(StableAbi::Abi3)\n        || abi.kind == PythonAbiKind::Stable(StableAbi::Abi3t)\n    {\n        let mut lib_name = if debug {\n            WINDOWS_STABLE_ABI_DEBUG_LIB_NAME.to_owned()\n        } else {\n            WINDOWS_STABLE_ABI_LIB_NAME.to_owned()\n        };\n        if abi.kind == PythonAbiKind::Stable(StableAbi::Abi3t) {\n            lib_name = lib_name.replace(\"python3\", \"python3t\");\n        }\n        Ok(lib_name)\n    } else if abi.kind().is_free_threaded() {\n        #[expect(deprecated, reason = \"using constant internally\")]\n        {\n            ensure!(abi.version() >= PythonVersion::PY313, \"Cannot compile extensions for the free-threaded build on Python versions earlier than 3.13, found {}.{}\", abi.version.major, abi.version.minor);\n        }\n        if debug {\n            Ok(format!(\n                \"python{}{}t_d\",\n                abi.version.major, abi.version.minor\n            ))\n        } else {\n            Ok(format!(\"python{}{}t\", abi.version.major, abi.version.minor))\n        }\n    } else if debug {\n        Ok(format!(\n            \"python{}{}_d\",\n            abi.version.major, abi.version.minor\n        ))\n    } else {\n        Ok(format!(\"python{}{}\", abi.version.major, abi.version.minor))\n    }\n}","sourceCodeStart":2420,"sourceCodeEnd":2456,"githubUrl":"https://github.com/PyO3/pyo3/blob/ac9b6899d348be4d54614d060dea53a645a12e36/pyo3-build-config/src/impl_.rs#L2420-L2456","documentation":"Version guard raised while computing Windows link/library names from the resolved ABI: the configuration selects a free-threaded build but the interpreter version resolved to something earlier than 3.13. Free-threaded CPython (Py_GIL_DISABLED) does not exist before 3.13, so no such library can be linked.","triggerScenarios":"Thrown at pyo3-build-config/src/impl_.rs:2438 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upgrade the target interpreter to 3.13+ when building free-threaded extensions","Drop the free-threaded ABI selection for older interpreters","Fix a wrong PYO3_CROSS_PYTHON_VERSION or sysconfigdata that misreports the version"],"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"}