Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate piwheels.org to let users install non-pure Python packages #139

Open
SyntaxColoring opened this issue Oct 1, 2021 · 2 comments
Labels
packages Ticket deals with adding or removing packages from the system robot-svcs Robot Services system This issue or PR involves the linux system base

Comments

@SyntaxColoring
Copy link
Contributor

SyntaxColoring commented Oct 1, 2021

Our root partition is apparently very low on space (Opentrons/opentrons#8184).

Some of our space is currently wasted on big packages like pandas (#61). We don't actually need pandas in the root partition; we include it there because users sometimes need it, and it's prohibitively difficult for them to pip install on their own to the big user partition. pip install fails because of some combination of the package depending on native libraries, and requiring a working compiler.

Instead of us continuing to keep packages like this in our root partition, we might be able to get pip install to work by configuring pip to use https://www.piwheels.org/, a community-maintained repository of Python wheel builds specifically for the Raspberry Pi.

  • See if this piwheels.org thing works
  • If it works, develop a user-facing migration guide and procedure for users to use going forward
  • Investigate what other packages besides pandas we'd like to offload
  • Consider safety and security implications
@SyntaxColoring SyntaxColoring added system This issue or PR involves the linux system base robot-svcs Robot Services packages Ticket deals with adding or removing packages from the system labels Oct 1, 2021
@binfordn
Copy link

binfordn commented Dec 1, 2021

I did a test with two packages that have native dependencies: sila2 and scipy.

The packages and their dependencies installed successfully. However, I got errors when trying to actually use the packages. It looks like some shared library files are still unable to be found:

from sila2.client import SilaClient
(Traceback...)
ImportError: libxslt.so.1: cannot open shared object file: No such file or directory
from sila2.discovery import SilaDiscoveryBrowser
(Traceback...)
ImportError: /lib/libc.so.6: version `GLIBC_2.33' not found (required by /var/user-packages/usr/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so)
import scipy
(Traceback...)
ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

@SyntaxColoring
Copy link
Contributor Author

SyntaxColoring commented Dec 1, 2021

Hmm, thanks for testing that.

Just having skimmed those error messages (and not having done any real investigation on this, so take this with a grain of salt), the libc error looks concerning. I wonder if we're on musl whereas piwheels is assuming glibc, or something. If so, we might be able to work around that with buildroot changes.

But the fundamental underlying problem that that would point to is piwheels explicitly being specifically for Raspberry Pi OS, whereas we are definitely not running Raspberry Pi OS.

The repository at piwheels.org does not support Ubuntu or other distributions. It's possible some wheels will work on other distributions, but we can't promise that they will. Wheels are built against certain shared libraries which we know are available to Raspberry Pi OS users too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Ticket deals with adding or removing packages from the system robot-svcs Robot Services system This issue or PR involves the linux system base
Projects
None yet
Development

No branches or pull requests

2 participants