pip list is unable to mention architecture
See original GitHub issueDescription
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
- I agree to follow the PSF Code of Conduct.
Issue Analytics
- State:
- Created a year ago
- Comments:14 (14 by maintainers)
Top GitHub 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.