Table of Contents |
---|
Introduction
Installing Python libraries is as simple as pip install name
. But how does it work?
Wheels
Python libraries contain a lot of non Python code (e.g. C++, CUDA, other compiled non Python libraries (e.g. DLL and shared objects)). Therefore, to allow installation by pip , the library as a whole is compiled and the output is grouped into a wheel file (extension whl
). The wheel file also contains metadata such as version, Python version compatibility, OS compatibility, and processor architecture compatibility. Every Python library typically has multiple wheel files for different processor architectures for the same Python and library version.
...
[pip name] is the name on PyPi (e.g.
opencv_python
,pyav
)[version number] is the version of the Python library (e.g.
4.8.71.8
,11.4.1
)[Python version] is the supported Python version (e.g.
cp37-abi3
,cp38-cp38
)[OS and processor architecture] is the OS version and processor architecture. Example:
Windows 32 bit on x86:
win32
Windows 64 bit on x86-64:
win_amd64
Mac 64 bit on x86:
macosx_10_16_x86_64
Max 64 bit on ARM:
macosx_11_0_arm64
Linux 64 bit on x86-64:
manylinux_2_17_x86_64.manylinux2014_x86_64
Linux 64 bit on ARM:
manylinux_2_17_aarch64.manylinux2014_aarch64
Processor architecture
A processor architecture is the instruction set architecture (ISA) supported by the processor. Some notable ISAs include:
...