{"record":{"id":"c1a32456314c5183","repo":"astral-sh/uv","slug":"the-requested-interpreter-resolved-to-python-w","errorCode":null,"errorMessage":"The requested interpreter resolved to Python {}, which is incompatible with the `pylock.toml`'s Python requirement: `{}`","messagePattern":"The requested interpreter resolved to Python (.+?), which is incompatible with the `pylock\\.toml`'s Python requirement: `(.+?)`","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/pylock.rs","lineNumber":73,"sourceCode":"    Ok((install_path, lock))\n}\n\n/// Verify Python compatibility and convert a parsed [`PylockToml`] into a [`Resolution`] with its\n/// [`HashStrategy`].\npub(crate) fn resolve_pylock_toml(\n    lock: PylockToml,\n    install_path: &Path,\n    interpreter: &Interpreter,\n    python_version: Option<&PythonVersion>,\n    python_platform: Option<&TargetTriple>,\n    extras: &[ExtraName],\n    groups: &[GroupName],\n    build_options: &BuildOptions,\n    hash_checking: Option<HashCheckingMode>,\n) -> anyhow::Result<(Resolution, HashStrategy)> {\n    if let Some(requires_python) = lock.requires_python.as_ref() {\n        if !requires_python.contains(interpreter.python_version()) {\n            return Err(anyhow::anyhow!(\n                \"The requested interpreter resolved to Python {}, which is incompatible with the `pylock.toml`'s Python requirement: `{}`\",\n                interpreter.python_version(),\n                requires_python,\n            ));\n        }\n    }\n\n    let tags = resolution_tags(python_version, python_platform, interpreter)?;\n    let marker_env = resolution_markers(python_version, python_platform, interpreter);\n\n    let resolution = lock.to_resolution(\n        install_path,\n        marker_env.markers(),\n        extras,\n        groups,\n        &tags,\n        build_options,\n    )?;","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/pylock.rs#L55-L91","documentation":"Error \"The requested interpreter resolved to Python {}, which is incompatible with the `pylock.toml`'s Python requirement: `{}`\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/pylock.rs:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f1a42680ff5272232d65748acf338b19778dde24","analyzedAt":"2026-08-16T04:51:47.599Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}