Hacker News new | ask | show | jobs
by kwertzzz 1377 days ago
One solution that I often hear about Python packages is the use of wheels. But I am wondering how this can work when multiple package depend (directly or indirectly) on a C library like zlib. As far as I know, there is no authority that decides which zlib version should be used. So I package A uses zlib.so.1 but package B uses zlib.so.2 can both be loaded at the same time ? (the version numbers are just examples for two incompatible version numbers)
1 comments

Publicly available wheels are typically for pure Python packages (you can often see the specific runtime version they were created for). Last I checked, packaging architecture specific binaries was frowned upon, but I might be wrong here.
As far as I can tell one of the arguments for wheels is that the "Installation of a C extension does not require a compiler on Linux, Windows or macOS"[0]. I also check some scipy wheel file and there are some binary libraries. If it is not via wheels, what would be the recommended way to install packages with C extensions (requiring 3rd party libraries)? To my understanding, this is why anaconda is so popular (despite not being an "official" package manager).

[0] https://pythonwheels.com/

Well, the wheels maintained by the scientific community may sometimes bundle .so files for x86_64, I suppose. Since I work on both ARM and Intel, I have had to skip using wheels for a few things until they got aarch64 versions, and made sure whatever wheels I was using were only pure Python.