plain-carpet-73994
08/16/2021, 5:42 PM[python-setup]
interpreter_constraints = ['CPython==3.7.*']
but when she runs the pants
wrapper script she's getting an error that says `ProcessExecutionFailure: Process 'searching for python2
...` . She does have various python3
aliases set up via pyenv
so I'm not sure why it's looking for Python2. In the error you can see that it ran which -a python2
which fails because there is not python2
on the $PATH
. There is a python2.7
which I could symlink but I'm wondering why it's looking for Python2 at all.hundreds-father-404
08/16/2021, 5:43 PMhundreds-father-404
08/16/2021, 5:45 PMpython2
is there. But we shouldn't be failing.
You can try changing that option, although definitely interested in the errorplain-carpet-73994
08/16/2021, 5:48 PMhundreds-father-404
08/16/2021, 5:50 PMplain-carpet-73994
08/16/2021, 5:51 PMhappy-kitchen-89482
08/16/2021, 6:17 PMhundreds-father-404
08/16/2021, 6:19 PMplain-carpet-73994
08/16/2021, 6:35 PMplain-carpet-73994
08/16/2021, 6:37 PMplain-carpet-73994
08/16/2021, 7:30 PM15:23:51.60 [INFO] initializing scheduler...
15:23:52.68 [INFO] scheduler initialized.
15:23:53.07 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 229, in _run_inner
return self._perform_run(goals)
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 168, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 185, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 530, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 498, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
ProcessExecutionFailure: Process 'Searching for `python2` on PATH=/Users/ckolson/.pyenv/versions/3.7.10/bin:/Users/ckolson/.pyenv/versions/3.8.9/bin:/Users/ckolson/code/env/bin:/Users/ckolson/google-cloud-sdk/bin:/Users/ckolson/.pyenv/shims:/Users/ckolson/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' failed with exit code 1.
stdout:
stderr:
+ command -v which
+ command which -a python2
+ which -a python2
(Use --print-stacktrace to see more error details.)
hundreds-father-404
08/16/2021, 7:31 PMwhich -a python2
directly?hundreds-father-404
08/16/2021, 7:35 PMset -euox pipefail
if command -v which > /dev/null; then
command which -a $1 || true
else
command -v $1 || true
fi
I'm confused why the || true
isn't working... To debug, it may help to use `--no-process-execution-local-cleanup`: https://www.pantsbuild.org/v2.4/docs/troubleshooting#debug-tip-inspect-the-chroot-with---no-process-execution-local-cleanupplain-carpet-73994
08/16/2021, 8:09 PMplain-carpet-73994
08/16/2021, 8:10 PMset -e
but could that be the issue: a command did fail so maybe that takes precedence over the || true
?plain-carpet-73994
08/16/2021, 8:10 PMbootstrap_interpreter_names
to something you know doesn't exist like foo_python
and see it fail.plain-carpet-73994
08/16/2021, 8:10 PMhundreds-father-404
08/16/2021, 8:27 PMhundreds-father-404
08/16/2021, 8:46 PM