Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does pip know which Wheel to grab to work with your system?

If a Python Wheel contains pre-compiled code for the dependencies, how does pip decide or know which wheel to grab because compiled code can have problems such as only working for the OS/CPU architecture it was compiled on?

like image 940
Joe Avatar asked Sep 06 '25 03:09

Joe


1 Answers

The filename of a wheel specifies which platforms it is compatible with, and pip is able to check the platform of the machine it is running on, so it uses that information to figure out which wheels can be used. You can find more information about it here.

like image 85
Lionel Foxcroft Avatar answered Sep 07 '25 23:09

Lionel Foxcroft