windmill-labs/windmill · error
Cannot list python versions, is uv (0.5.19 and newer) instal
Error message
Cannot list python versions, is uv (0.5.19 and newer) installed? Err:
{} What it means
Windmill uses `uv python list` to discover installable Python versions for worker-side Python environments. If the uv command exits non-zero (uv missing, too old, not on PATH, or broken), the stderr is surfaced wrapped in this message asking whether uv >= 0.5.19 is installed.
Source
Thrown at backend/windmill-worker/src/python_versions.rs:369
)
}
})
.collect::<Result<Vec<PyV>, Error>>()?
.into_iter()
.unique()
.sorted()
.filter(|pyv| filter.contains(&*pyv))
.rev()
.collect_vec();
*LAST_CHECKED.write().await = Utc::now();
CACHED_VERSIONS.write().await.replace(list.clone());
Ok(list)
} else {
// If the command failed, print the error
let stderr = String::from_utf8(output.stderr)?;
bail!(
"Cannot list python versions, is uv (0.5.19 and newer) installed? Err:\n{}",
stderr
);
}
}
/// Parse lockfile for assigned python version.
/// If not found returns 3.11
pub fn parse_from_requirements<S: AsRef<str>>(requirements_lines: &[S]) -> Self {
Self::try_parse_from_requirements(requirements_lines).unwrap_or(
// If there is no assigned version in lockfile we automatically fallback to 3.11
// In this case we have dependencies or other metadata, but no associated python version
// This is the case for old deployed scripts
PyVAlias::default().into(),
)
}
/// Parse lockfile for assigned python version.View on GitHub (pinned to e474e8803c)
Solutions
- Install uv >= 0.5.19 on the worker, e.g. `curl -LsSf https://astral.sh/uv/install.sh | sh`, or bump the pinned uv in the worker Dockerfile
- Ensure the uv binary is on the PATH of the worker process (system-wide, e.g. /usr/local/bin, not only a user shell's ~/.local/bin)
- Run `uv python list` manually as the worker's user and read the raw stderr from the message to fix the underlying failure
- Restart the worker after installing/upgrading uv
Example fix
# before (Dockerfile) RUN apt-get install -y python3 # after RUN curl -LsSf https://astral.sh/uv/install.sh | sh && uv --version # >= 0.5.19
Defensive patterns
Strategy: try-catch
Validate before calling
#!/bin/sh
command -v uv >/dev/null 2>&1 || { echo 'uv not installed'; exit 1; }
[ "$(uv --version | awk '{print $2}' | tr -d .)" -ge 519 ] || { echo 'uv too old (<0.5.19)'; exit 1; } Try / catch
match result {
Err(e) if e.to_string().contains("Cannot list python versions") => {
// provision uv >= 0.5.19 on the worker, then retry
}
other => other?,
} Prevention
- Bake uv >= 0.5.19 into worker images at a system PATH location
- Pin and verify the uv version in CI before deploying workers
- Smoke-test Python version listing on worker startup health checks
- Avoid installing tools only in interactive shells the worker never sees
When it happens
Trigger: Listing available Python versions (worker startup / Python version picker) when `uv` is not installed, is older than 0.5.19 (which added `python list`), is not on the worker process's PATH, or otherwise exits non-zero — the stderr appears after `Err:`.
Common situations: Self-hosted worker image without uv; uv installed via a version manager not visible to the worker's PATH; an old uv pinned in a Dockerfile; a corrupted or permission-broken uv binary.
Related errors
- ${what} failed:\n${output}
- Cannot take stderr from uv_install_proccess
- Cannot take stdout from uv_install_proccess
- uv pip install was canceled
- could not read the run of job ${id}: ${res.status} ${await r
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/d0edf600be60181b.
Report an issue: GitHub.