#21303·uv

在版本冲突时,`uv pip install` 失败

作者: thorsten-klein创建于 2026年8月26日更新于 2026年9月17日
标签enhancement

Initially I install a package with uv pip install pkg<2. When there is another invocation uv pip install tool>2, uv silently reinstalls this version, even if it conflicts with the previous requirement. This also shows up in real-world usage: in Zephyr projects, the install flow does uv pip install $(west packages pip), and a second uv pip install <more-packages> run later against the same venv can silently change package versions pinned by the first invocation — because uv pip install only treats the currently-installed version as a soft preference for the current resolve, with no memory of what was explicitly required in a previous call. This isn't caught at install time; it only surfaces later, at runtime, when the mismatched version breaks something, by which point it's hard to trace back to which install call caused it.