jolly-midnight-72759
11/10/2020, 3:51 PMjolly-midnight-72759
11/10/2020, 3:52 PMhundreds-father-404
11/10/2020, 3:56 PMpython
, python2
, and python3
for the interpreter to run Pex, and test that they’re valid binaries. That all happens in parallel.jolly-midnight-72759
11/10/2020, 4:13 PMjolly-midnight-72759
11/10/2020, 4:14 PMhundreds-father-404
11/10/2020, 4:18 PMenough-analyst-54434
11/10/2020, 4:20 PM--pex-verbosity=9
?hundreds-father-404
11/10/2020, 4:21 PMhundreds-father-404
11/10/2020, 4:22 PMjolly-midnight-72759
11/10/2020, 4:26 PMpex-verbosity
?enough-analyst-54434
11/10/2020, 4:27 PMjolly-midnight-72759
11/10/2020, 4:30 PMenough-analyst-54434
11/10/2020, 4:31 PMenough-analyst-54434
11/10/2020, 5:14 PMFROM ubuntu:18.04
RUN apt update && apt upgrade -y && apt install -y locales language-pack-en
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
RUN apt install -y curl python python3-dev git vim build-essential unzip tar
I reproduce using:
$ docker run --rm -it raul:3.6
root@f1a736edc580:/# git clone <https://github.com/pantsbuild/example-python>
Cloning into 'example-python'...
remote: Enumerating objects: 329, done.
remote: Total 329 (delta 0), reused 0 (delta 0), pack-reused 329
Receiving objects: 100% (329/329), 74.15 KiB | 1.65 MiB/s, done.
Resolving deltas: 100% (197/197), done.
root@f1a736edc580:/# cd example-python
root@f1a736edc580:/example-python# ./pants fmt lint typecheck test ::
...
New virtual environment successfully created at /root/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36.
17:11:46.96 [INFO] initializing pantsd...
17:11:47.83 [INFO] pantsd initialized.
17:11:48.02 [INFO] No pyenv binary found. Will not use pyenv interpreters.
17:11:54.18 [INFO] Completed: Building docformatter.pex with 1 requirement: docformatter>=1.3.1,<1.4
17:11:54.53 [INFO] Completed: Format with docformatter - made no changes.
17:11:54.88 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/root/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 289, in run
engine_result = self._run_v2()
File "/root/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 195, in _run_v2
return self._maybe_run_v2_body(goals, poll=False)
File "/root/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 217, in _maybe_run_v2_body
poll_delay=(0.1 if poll else None),
File "/root/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/lib/python3.6/site-packages/pants/init/engine_initializer.py", line 127, in run_goal_rules
goal_product, params, poll=poll, poll_delay=poll_delay
File "/root/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/lib/python3.6/site-packages/pants/engine/internals/scheduler.py", line 569, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/root/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/lib/python3.6/site-packages/pants/engine/internals/scheduler.py", line 539, in _raise_on_error
wrapped_exceptions=tuple(t.exc for t in throws),
Exception message: 1 Exception encountered:
ProcessExecutionFailure: Process 'Find interpreter for constraints: CPython>=3.6' failed with exit code 102.
stdout:
stderr:
Could not find a compatible interpreter.
Examined the following interpreters:
1.) /usr/bin/python2.7 CPython==2.7.17
No interpreter compatible with the requested constraints was found:
Version matches CPython>=3.6
(Use --print-stacktrace to see more error details.)
root@f1a736edc580:/example-python#
jolly-midnight-72759
11/10/2020, 5:36 PMenough-analyst-54434
11/10/2020, 5:46 PMenough-analyst-54434
11/10/2020, 6:36 PMhundreds-father-404
11/10/2020, 6:37 PM--python-path
to reduce # of changesjolly-midnight-72759
11/10/2020, 6:41 PMenough-analyst-54434
11/10/2020, 6:42 PMjolly-midnight-72759
11/10/2020, 6:43 PMPermissionDenied
error which started me down this path?jolly-midnight-72759
11/10/2020, 6:45 PM<PYENV>
comes before <PYPATH>
, yes?hundreds-father-404
11/10/2020, 6:45 PM--pantsd
is used.jolly-midnight-72759
11/10/2020, 6:46 PMPermissionDenied
. 🛒hundreds-father-404
11/10/2020, 6:47 PMAnd the reason I don’t see this bug on my mac is because <PYENV> comes before <PYPATH>, yes?The ordering doesn’t matter for
interpreter_search_paths
. It works on your mac because you have interpreters in two distinct directories, so you’re not hitting this edge case where the sibling interpreters to the current interpreter are not considered. The issue is that CI has everything in a single directory
(Which, again, should be fine. Pex bug)jolly-midnight-72759
11/10/2020, 6:47 PMenough-analyst-54434
11/10/2020, 6:47 PMjolly-midnight-72759
11/10/2020, 6:48 PMenough-analyst-54434
11/10/2020, 6:48 PMjolly-midnight-72759
11/10/2020, 6:48 PM