Skip to content

uv pip list output does not match pip list: distribution package names instead of import package names #13209

@gjoseph92

Description

@gjoseph92

Summary

uv pip list and pip list's outputs seem to refer to package names differently. I believe uv is using distribution package names, whereas pip is using import package names.

uv init uv-pip-list
cd uv-pip-list
uv add docstring-parser jaraco-classes pymupdfb pypdf2 pip
diff --side-by-side  <(uv run pip list) <(uv pip list)
Package          Version					Package          Version
---------------- -------					---------------- -------
docstring_parser 0.16					      |	docstring-parser 0.16
jaraco.classes   3.4.0					      |	jaraco-classes   3.4.0
more-itertools   10.7.0						more-itertools   10.7.0
pip              25.1						pip              25.1
PyMuPDFb         1.24.10				      |	pymupdfb         1.24.10
PyPDF2           3.0.1					      |	pypdf2           3.0.1

Notice that the _ in docstring_parser (pip) becomes - in docstring-parser (uv), case in PyMuPDFb is lost, etc.

Not sure this is a big deal. When I switched a system over to uv, it broke some old code that parses the output of pip list. Honestly, I might prefer uv's choice, since it matches with what you'd uv pip uninstall/install. But given how widely pip list is probably parsed, being consistent might be preferable.

Platform

Darwin 24.4.0 arm64

Version

uv 0.4.30

Python version

Python 3.12.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibilityCompatibility with a specification or another toolquestionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions