I'm running an M1 laptop and am having trouble ins...
# general
s
I'm running an M1 laptop and am having trouble installing*
grpcio
when using pants. I'm trying to run some tests but I get a very long error
Copy code
ERROR: Failed building wheel for grpcio
ERROR: Failed to build one or more wheels
One of the line I see before getting a whole bunch of irrelevant
c
noise is
Copy code
Building requirements.pex with 4 requirements: google-cloud-pubsub~=2.14.1, google-cloud-secret-manager~=2.12.6, pydantic~=1.10.2, pytest~=7.1.3
I've set
Copy code
[python]
interpreter_constraints = ["CPython==3.10"]
I'm confused because if I create a
venv
via
python3.10 -m venv venv
I can install all of the above dependencies. I've tried adding
--keep-sandboxes=on_failure
but I don't know how to inspect the sandboxes (they just seem to be bash files?)
e
It's not irrelevant noise. Pants has selected an arm interpreter which there is no published wheel for; so it must build one from the sdist: https://pypi.org/project/grpcio/#files I bet when you create the venv you're either using an x86_64 interpreter via Rosetta or you're using an arm interpreter there too, but there are environment variables used as part of the build that Pants blocks (Pants blocks all env vars you don't otherwise leak using https://www.pantsbuild.org/docs/reference-subprocess-environment#env_vars)
s
Thanks for the link
Thanks @enough-analyst-54434, that appears to have solved it! Now I have new problem to solve but that's for another day