r/learnpython • u/MasterLeague001 • Oct 05 '24
Does linux support all python libraries?
Does linux support all python libraries?
42
u/carcigenicate Carcigenicate Oct 05 '24
Not necessarily. It wouldn't make sense for Linux to support a library that's a wrapper over the Win32API for example.
13
u/Swipecat Oct 05 '24
No. But the majority of libraries are either platform-independent or come in multiple platform versions. Of the small minority that are single-platform, there's probably more linux-only libraries than windows-only libraries.
If you're wondering how many python libraries are supplied as pre-compiled packages in the repositories of the main linux distros, it's about 4500. (There are about half a million packages on PyPI.)
17
u/mrswats Oct 05 '24
That question doesn't make any sense as is. Please think about your problem and ask a concrete question.
3
u/DuckDatum Oct 05 '24 edited Aug 12 '25
quickest fly spoon terrific violet rob treatment aback heavy racial
This post was mass deleted and anonymized with Redact
2
u/Axiomancer Oct 05 '24
There are python libraries that will not be usable on linux, if that is your question.
5
u/pachura3 Oct 05 '24
Your question is too general. Could you name some libraries you're interested in?
1
1
u/stuaxo Oct 05 '24
That's a bit of a silly question some libraries are for things that are not on Linux, like DirectX.
Python on Linux probably has the broadest support though.
1
u/billsil Oct 05 '24
No. There are Windows/Mac/Linux variant specific libraries out there.
For my library, yes, but I don’t run on Linux/Mac, so there are a few extra issues, even though the CI is on Linux.
1
1
1
u/jmacey Oct 05 '24
I should imagine this is windows only https://github.com/rdeioris/pydx12 (unless you use wine and a lot of hacking :-) )
To be serious most will have multi platform bindings with specific OS code, some libraries are the other way where they aim to make OS agnostic code to do specific things which are different on all platforms for example shutil https://docs.python.org/3/library/shutil.html
21
u/gmes78 Oct 05 '24
No OS can run all Python packages.