jdx/mise · error

Python dependency locks require uv >=

Error message

Python dependency locks require uv >= {MIN_UV_VERSION}

What it means

mise's pipx backend replays Python dependency locks with uv, and the lockfile format it produces/consumes requires at least uv 0.12.10 (MIN_UV_VERSION). After locating a `uv` executable, lock_uv_program runs `uv --version` and parses the reported version; if it is older than the minimum (or the version string cannot be compared, in which case semver_is_older_than returns true via unwrap_or(true)), the lock operation is aborted. This prevents replaying locks with a uv that may produce incompatible graph output.

Solutions

  1. Upgrade uv to >= 0.12.10 (e.g. `mise use -g uv@latest` or `uv self update`, or your platform installer).
  2. Run `mise use uv` so mise-managed uv is on PATH for pipx-backed tools.
  3. Check which uv is being picked up with `which uv; uv --version` and remove/shadow the stale binary.
  4. If the version string is unusual (source build), install a release build of uv with a standard semver `--version` output.

Example fix

// before: old system uv on PATH
$ uv --version
uv 0.5.11

// after
$ mise use -g uv@latest
$ uv --version
uv 0.12.10
Defensive patterns

Strategy: validation

Validate before calling

const uvVer = run('uv --version').split(' ')[1];
if (semverLt(uvVer, '0.12.10')) throw new Error(`uv ${uvVer} too old; need >= 0.12.10`);

Prevention

When it happens

Trigger: Occurs inside lock_uv_program, called from resolve_uv_lock and install_uv_lock, when the resolved `uv` binary reports a version string older than 0.12.10, or when `uv --version` output cannot be semantically compared (e.g. a dev build, custom string, or unparsable version) because unwrap_or(true) treats unknown as too old.

Common situations: A developer has uv installed system-wide (homebrew, apt, pipx) but never upgraded it; a CI image pins an old uv; `mise use uv` installed uv into a different tool version than the one picked up on PATH; a distro ships uv 0.5/0.7 era builds that predate uv.lock graph features.

Understand the failure class

Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/52b025c35c2c4993. Report an issue: GitHub.

Appendix: source

Thrown at src/backend/pipx/lock.rs:85

        if !self.uv_lock_allowed(tv) {
            bail!(
                "{} has a uv dependency graph; use uv with a PyPI package to replay it",
                self.ba.short
            );
        }
        Ok(())
    }

    async fn lock_uv_program(&self, config: &Arc<Config>) -> Result<PathBuf> {
        let uv = self.spawnable_dependency(config, None, "uv").await
            .ok_or_else(|| eyre!("Python dependency locks require uv >= {MIN_UV_VERSION}; install it with `mise use uv`"))?;
        let output = CmdLineRunner::new(&uv).arg("--version").read().await?;
        let version = output
            .split_whitespace()
            .nth(1)
            .ok_or_else(|| eyre!("cannot determine uv version"))?;
        if semver_is_older_than(version, MIN_UV_VERSION).unwrap_or(true) {
            bail!("Python dependency locks require uv >= {MIN_UV_VERSION}");
        }
        Ok(uv)
    }

    async fn configured_python_identity(&self, config: &Arc<Config>) -> Option<String> {
        let ts = self.dependency_toolset(config).await.ok()?;
        let (_, python) = ts
            .list_current_versions()
            .into_iter()
            .find(|(_, tv)| tv.ba().short == "python")?;
        Some(format!(
            "{}:{}:{}",
            python.ba().full(),
            python.version,
            python.install_path().display()
        ))
    }

View on GitHub (pinned to 533346cc37)