green-tiger-17672
03/09/2023, 3:41 PM09:36:02.92 [INFO] Scheduler initialized.
09:36:05.09 [INFO] Preserving local process execution dir /private/var/folders/8b/_mfgyxjj7wg972pfzn9rqnw40000gn/T/pants-sandbox-5BvC0E for Building 7 requirements for requirements.pex from the python-default.lock resolve: SQLAlchemy==1.4, loguru==0.6.0, psycopg2-binary==2.9.5, requests==2.27.1, sqlalchemy-stubs==0.4, types-requests==2.28.11.2, typing_extensions==4.4.0
09:36:05.09 [INFO] Completed: Building 7 requirements for requirements.pex from the python-default.lock resolve: SQLAlchemy==1.4, loguru==0.6.0, psycopg2-binary==2.9.5, requests==2.27.1, sqlalchemy-stubs==0.4, types-requests==2.28... (31 characters truncated)
09:36:05.09 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building 7 requirements for requirements.pex from the python-default.lock resolve: SQLAlchemy==1.4, loguru==0.6.0, psycopg2-binary==2.9.5, requests==2.27.1, sqlalchemy-stubs==0.4, types-requests==2.28.11.2, typing_extensions==4.4.0' failed with exit code 1.
stdout:
stderr:
There was 1 error downloading required artifacts:
1. psycopg2-binary 2.9.5 from <https://files.pythonhosted.org/packages/8c/45/77147700f5088efaf9235a3a62b611b594d477a5c5613b5316d0ebd18be0/psycopg2-binary-2.9.5.tar.gz>
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Im currently on an M1 mac and this error presented itself after pulling down code from another colleague, however there were no major code changes. Has anyone encountered this before?happy-kitchen-89482
03/09/2023, 4:20 PMpsycopg2-binary
is the gift that keeps on giving. If you search for it on this Slack you'll get so many issues... 😞
The gist is that psycopg2-binary
is distributed as an sdist, and contains native code, so it has to be compiled on your platform, which is done by Pip (via Pex). And that is failing on your system.happy-kitchen-89482
03/09/2023, 4:28 PM--keep-sandboxes=on_failure
, and Pants will log the sandbox directory that the pex process ran in. Then cd
to that directory, and run ./__run.sh
to confirm that the failure still happens if you re-run manually in the sandbox.
• If the failure doesn't happen, it almost certainly means that there's an env var that the pip build is relying on that isn't being plumbed into the sandbox (./__run.sh
doesn't isolate your environment the way Pants does). So then we can figure out which env var that is.
• If the failure does happen, you can edit ./__run.sh
to add --preserve-pip-download-log
to the Pex command line. Then run it again. It'll log the location of that pip log, and you can poke in that to see what the issue might be.happy-kitchen-89482
03/09/2023, 4:28 PMgreen-tiger-17672
03/14/2023, 6:46 PMhappy-kitchen-89482
03/14/2023, 9:13 PM-ldebug
, maybe that will emit the Pex output (which in turn should emit the pip output)