astral-sh/uv · error
Invalid installed distribution path: `{}`
Error message
Invalid installed distribution path: `{}` What it means
Error "Invalid installed distribution path: `{}`" thrown in astral-sh/uv.
Source
Thrown at crates/uv/src/commands/pip/operations.rs:909
/// Return the Python source files owned by the distributions installed by this operation.
fn python_source_files_for_installs<'a>(
venv: &'a PythonEnvironment,
installs: &'a [CachedDist],
) -> impl Iterator<Item = anyhow::Result<PathBuf>> + 'a {
let layout = venv.interpreter().layout();
let site_packages = [
CWD.join(&layout.scheme.purelib),
CWD.join(&layout.scheme.platlib),
];
installs.iter().flat_map(move |install| {
let dist_info = match installed_dist_info_path(&layout, install.path()).with_context(|| {
format!("Failed to locate installed distribution for bytecode compilation: `{install}`")
}) {
Ok(dist_info) => dist_info,
Err(err) => return Box::new(std::iter::once(Err(err))) as PythonSourceFileIterator,
};
let Some(record_root) = dist_info.parent().map(|path| CWD.join(path)) else {
return Box::new(std::iter::once(Err(anyhow!(
"Invalid installed distribution path: `{}`",
dist_info.user_display()
))));
};
let record_path = dist_info.join("RECORD");
let record_file = match fs_err::File::open(&record_path) {
Ok(record_file) => record_file,
// Another process may have removed the installed distribution.
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {
return Box::new(std::iter::empty());
}
Err(err) => {
return Box::new(std::iter::once(Err(err).with_context(|| {
format!("Failed to read `{}`", record_path.user_display())
})));
}
};
let site_packages = site_packages.clone();View on GitHub (pinned to f1a42680ff)
When it happens
Trigger: Thrown at crates/uv/src/commands/pip/operations.rs:909 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astral-sh/uv@f1a42680ff (2026-08-16).
Data as JSON: /api/errors/74e2bbc198700725.
Report an issue: GitHub.