I have an external engineer who is runnung MacOS S...
# general
a
I have an external engineer who is runnung MacOS Sequoia. I'm trying to get him to export a virtualenv in our repo, Whenever he tries to resolve 3rdparty deps, we get an immediate exit code 1 from the resolve process
Copy code
15:47:13.80 [INFO] Completed: Build pex for resolve `python-default`
15:47:13.80 [ERROR] 1 Exception encountered:

Engine traceback:
  in `export` goal

ProcessExecutionFailure: Process 'Build pex for resolve `python-default`' failed with exit code 1.
stdout:

stderr:
pid 2891 -> /Users/samw/.cache/pants/named_caches/pex_root/venvs/7fd29932d86a744f8a544214470ad8d101a53805/87cdf509690f1cfd475dbc0eb24b9b00ef5403fd/bin/python -sE /Users/samw/.cache/pants/named_caches/pex_root/venvs/7fd29932d86a744f8a544214470ad8d101a53805/87cdf509690f1cfd475dbc0eb24b9b00ef5403fd/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -q --cache-dir /Users/samw/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache download --dest /Users/samw/.cache/pants/named_caches/pex_root/downloads/resolver_download.pj7unmyn/Users.samw..pyenv.versions.3.9.18.bin.python3.9 pip==23.0.1 setuptools==67.4.0 wheel==0.38.4 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with -11 and STDERR:
None



Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
Any hints on where to go with this?
I suspect there is something awry with his python install. The pants project is configured to use python 3.9, his sytem python is 3.10. 3.9 is installed via pyenv.
h
If you’re referring to the Python that Pants itself uses for its own code, that is provided by the Pants binary as an internal implementation detail, and is entirely separate from any system python, or the python your code uses.
a
Honestly I'm grasping at straws
h
But yeah, that -11 means segfault
Might try uninstalling and reinstalling 3.9
a
Can give it a go. It was a fresh pyenv install though. Might try installing it through homebrew instead.
h
Generally we’ve found pyenv to work just fine
But I guess it’s worth a try
a
Yeah, that's my normal setup.
So I'm a bit baffled
h
Typically to debug you could run with
--keep-sandboxes=always
and locate the failing sandbox (the locations are logged to the terminal)
In that sandbox,
__run.sh
contains the command Pants ran
a
Yeah, did that, just got the same issue. It's invoking pex
h
you can try running it in there and see if the problem still happens
OK, and Pex is running Pip
a
Ja.
h
So run that pex command with enough debug output to get at the pip command
👍 1
E.g., add
-v
or
-vv
or
-vvv
etc to get at increasingly verbose logs, and add
--pip-log path/to/log
to see pip’s log
And use
--pip-version
to try a different pip version
e.g.,
--pip-version=latest
(this is the latest version pex knows about, not necessarily the latest version that exists)
Or use
--help
to see all the values you can use
a
Alright, I'll give it a crack. Thanks for the pointers!
h
If we can reproduce this in raw pip, with no pants or pex, that is a smoking gun
a
pip install requests
immediately segfaults. Thanks, should have tried that first 🙏
💥 1