uv
uv copied to clipboard
`uv pip check` gives a different result to `pip check`
Added uv pip check to replace pip check in our CI (i.e. here. The CI passed previously without issue when running pip check, but when switching to uv I get the following error:
Run uv pip check
Checked 81 packages in 0.71ms
Found 1 incompatibility
The package `pip` has multiple installed distributions:
- /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pip-23.0.1.dist-info
- /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pip-24.0.dist-info
Error: Process completed with exit code 1.
Is there any guidance / docs on how uv's pip check differs from normal pip check?
The things we check for:
- Package has no
METADATA, or theMETADATAcan't be parsed. - Package has a
Requires-Pythonthat doesn't match the current interpreter. - Package has a dependency on a package that isn't installed.
- Package has a dependency on a package; it's installed, but not at a compatible version.
- Multiple versions of a package are installed in the virtual environment.
I'm not sure what pip check looks for exactly. Seems like it doesn't validate the last point.
Ok so the trick there was just to use virtual environments instead of installing into the raw global system... Thanks for this explanation. I'm sure what you wrote above would be useful for an eventual docs page for uv, along with guidance around using uv with github actions.
I'll add these to the docs!