pip: pip list is unable to mention architecture

Description

If someone happens to upgrade from intel to aarch64, pip will not be able to help him identify any packages that are using wrong architecture. They would have to either uninstall or use install --force in order to address the issue.

Expected behavior

At least the JSON output of pip list should mention architecture when that is avaiable but now it does not do this:

python -m pip list --format=json

Ideally pip should all be smart enough to detect a mismatch in architecture and ignore or warn about mismatched packages. For example pip check would be a good candidate for that too.

pip version

22.0.4

Python version

3.11.3

OS

MacOS

How to Reproduce

It might be harder to reproduce the way I got into it, as I used Apple Migration Assistant to migrate from old computer to the new one but I guess you could just force pip to install a binary wheel using a different architecture.

Once this happens, you are kinda clueless if the wheel is usable or not, at least until you try to do an import from the binary parts.

Output

No response

Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Personally I am +1 to adding this to pip check.

Doesn’t the .dist-info/WHEEL file include the wheel tags, from which the architecture can be parsed? I can’t see an explicit requirement from PEP 427 that the file be copied over from the wheel, but I think all tools do in practice.