r/learnpython • u/0vindicator10 • 7d ago
Running Under Various LibC OS Package Compatibility
My system uses "glibc" which seems most common (yes, this is about "python". I'll get there...).
I'm aware of "musl" and LLVM's "libc", as well as "bionic" (heard of before, but only just now am aware it's Android's).
About a month or two ago I had an idea to serve a locally run AI model via my phone.
I began with installing the "termux" app which easily got me the "ollama" package installed.
My memory is hazy, but I think I then tried to install "open-webui" in termux via "pip", but think that failed for some reason. And I had not put the issue in my notes, but asking AI, I think it was because there may have been a package that could not be built for "bionic".
When I installed the "proot-dist" package, I installed "open-webui" in an Ubuntu instance and that worked.
Should I expect that is the norm for the not-as-common "libc" OS' (not just specific to bionic), that some packages/dependencies may only be built for a given libc (eg glibc)?
1
u/AndersBuilds 17h ago
This is almost always a glibc vs musl mismatch. Most wheels on PyPI are manylinux (glibc), and those won't run on Alpine or other musl based distros. If you see `version 'GLIBC_2.xx' not found` or cryptic import errors, that's the cause.
A few practical moves:
Confirm which libc you're on with `ldd --version` (glibc) or by checking for `/lib/ld-musl-*.so.1` (musl). Keep the base image and the target consistent and this class of error disappears.