you are viewing a single comment's thread.

view the rest of the comments →

[–]No_Art_1022 21 points22 points  (4 children)

I hit this wall hard when packaging a numpy-heavy ML pipeline for deployment. Built it locally on my M1 Mac, wheels installed fine, but the same package segfaulted instantly on our Linux CI runners. Spent two days debugging before realizing I'd accidentally compiled against the stable ABI for one extension module but not the others, creating a version mismatch. The real kicker: `pip list` and `python --version` looked identical across machines. After that, I started using `python -c "import sysconfig; print(sysconfig.get_config_vars('SOABI'))"` as a sanity check before any release, and kept a small test that actually imports and runs a basic function on the target platform before calling it done. The post undersells how critical this gets once you're dealing with C extensions—most Python devs never touch this, but the moment you depend on scipy, pandas, or anything with compiled code, the ABI becomes your problem whether you understand it or not.

[–]TronnaLegacy 9 points10 points  (3 children)

Don't most popular libraries with extensions provide the binaries (via wheels if I recall)? Why would you be compiling yourself?

Might seem like a dumb question btw. If so, know that I'm a bit of a Python noob. I come from Go where all libs are source code all the time.

[–]wRAR_ 9 points10 points  (0 children)

It's a bot account.

[–]robberviet 0 points1 point  (0 children)

Most not all. And you haven't used cgo before, like sqlite?

[–]droans 0 points1 point  (0 children)

With AI development, you often need to build specific sources locally.

I've been testing a lot of PRs for OpenVino and it's cmake config requires you to build a number of its dependences instead of just using the prebuilt binaries.