{"record":{"id":"c83aa82c0e36aab4","repo":"astral-sh/uv","slug":"cannot-uninstall-managed-python-for-request-requ","errorCode":null,"errorMessage":"Cannot uninstall managed Python for request: {request}","messagePattern":"Cannot uninstall managed Python for request: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/python/uninstall.rs","lineNumber":84,"sourceCode":"    printer: Printer,\n) -> Result<ExitStatus> {\n    let start = std::time::Instant::now();\n\n    let requests = if all {\n        vec![PythonRequest::Default]\n    } else {\n        let targets = targets.into_iter().collect::<BTreeSet<_>>();\n        targets\n            .iter()\n            .map(|target| PythonRequest::parse(target.as_str()))\n            .collect::<Vec<_>>()\n    };\n\n    let download_requests = requests\n        .iter()\n        .map(|request| {\n            PythonDownloadRequest::from_request(request).ok_or_else(|| {\n                anyhow::anyhow!(\"Cannot uninstall managed Python for request: {request}\")\n            })\n        })\n        // Always include pre-releases in uninstalls\n        .map(|result| result.map(|request| request.with_prereleases(true)))\n        .collect::<Result<Vec<_>>>()?;\n    let installed_installations: Vec<_> = installations.find_all()?.collect();\n    let mut matching_installations = BTreeSet::default();\n    for (request, download_request) in requests.iter().zip(download_requests) {\n        if matches!(requests.as_slice(), [PythonRequest::Default]) {\n            writeln!(printer.stderr(), \"Searching for Python installations\")?;\n        } else {\n            writeln!(\n                printer.stderr(),\n                \"Searching for Python versions matching: {}\",\n                request.cyan()\n            )?;\n        }\n        let mut found = false;","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/python/uninstall.rs#L66-L102","documentation":"Error \"Cannot uninstall managed Python for request: {request}\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/python/uninstall.rs:84 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"}