Hi! Is it possible to provide environment variable...
# general
s
Hi! Is it possible to provide environment variables to python pip commands? We have a monorepo using pants that contains many Python projects. One of those needs to install a specific version of numpy (
numpy==1.16.6
). This version does not have a prebuilt binrary, so pip needs to build it locally. The build fails on my M1 notebook due to a compilation issue. I verified that this is not due to pants by running the pip command directly and reproducing the error. Following the solution in this issue, I can successfully pip install that version of numpy by specifying a different BLAS to use via an
OPENBLAS
environment variable. However, when I run my pants build with that environment variable set, I still get the same original error. I don't know how to configure pants to allow the
OPENBLAS
environment variable through to the pip install command performed by pants. Can someone help me configure pants to allow an
OPENBLAS
environment variable through to pip install performed by pants?
☝️ 1
1
h
Hello! I believe that setting the env var in
<https://www.pantsbuild.org/docs/reference-subprocess-environment#env_vars>
should work
👀 1
s
Thanks! I'll give that a try.
🤞 1
I think that worked. Thanks!
❤️ 1