<#21048 Python provider not used for `pants packag...
# github-notifications
c
#21048 Python provider not used for `pants package` of `pex_binary` target Issue created by kaos Describe the bug When using
pants.backend.python.providers.experimental.pyenv
test, lint and check works fine, but package fails. Pants version 2.21.0 OS Ubuntu Additional info
Copy code
13:03:09  pants lint check test package ::
13:03:15  13:03:15.48 [INFO] waiting for pantsd to start...
13:03:18  13:03:17.78 [INFO] pantsd started
13:03:18  13:03:18.30 [INFO] Initializing scheduler...
13:03:24  13:03:24.02 [INFO] Scheduler initialized.
13:03:24  13:03:24.51 [INFO] Starting: Choose specific version for Python 3.9
13:03:24  13:03:24.68 [INFO] Completed: Choose specific version for Python 3.9
13:03:24  13:03:24.92 [INFO] Starting: Building isort.pex from <resource://pants.backend.python.lint.isort/isort.lock>
13:03:24  13:03:24.92 [INFO] Starting: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
13:03:25  13:03:24.97 [INFO] Starting: Building autoflake.pex from <resource://pants.backend.python.lint.autoflake/autoflake.lock>
13:03:25  13:03:24.97 [INFO] Starting: Building docformatter.pex from <resource://pants.backend.python.lint.docformatter/docformatter.lock>
13:03:25  13:03:24.97 [INFO] Starting: Building flake8.pex from <resource://pants.backend.python.lint.flake8/flake8.lock>
13:03:25  13:03:25.01 [INFO] Canceled: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
13:03:25  13:03:25.01 [INFO] Starting: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
13:03:25  13:03:25.01 [INFO] Canceled: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
13:03:25  13:03:25.01 [INFO] Starting: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
13:03:27  13:03:26.58 [INFO] Completed: Building isort.pex from <resource://pants.backend.python.lint.isort/isort.lock>
13:03:27  13:03:26.62 [INFO] Completed: Building flake8.pex from <resource://pants.backend.python.lint.flake8/flake8.lock>
13:03:27  13:03:26.63 [INFO] Completed: Building autoflake.pex from <resource://pants.backend.python.lint.autoflake/autoflake.lock>
13:03:27  13:03:26.67 [INFO] Completed: Building docformatter.pex from <resource://pants.backend.python.lint.docformatter/docformatter.lock>
13:03:27  13:03:26.85 [INFO] Completed: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
13:03:27  13:03:26.85 [INFO] Completed: Format with docformatter - docformatter made no changes.
13:03:27  13:03:26.86 [INFO] Completed: Format with isort - isort made no changes.
13:03:27  13:03:26.93 [INFO] Completed: Fix with Autoflake - autoflake made no changes.
13:03:27  13:03:26.97 [INFO] Completed: Lint with Flake8 - flake8 succeeded.
13:03:27  Partition: ['CPython==3.9.*']
13:03:27  
13:03:27  
13:03:27  13:03:27.26 [INFO] Completed: Format with Black - black made no changes.
13:03:27  
13:03:27  ✓ autoflake succeeded.
13:03:27  ✓ black succeeded.
13:03:27  ✓ docformatter succeeded.
13:03:27  ✓ flake8 succeeded.
13:03:27  ✓ isort succeeded.
13:03:27  13:03:27.51 [INFO] Starting: Building mypy.pex from <resource://pants.backend.python.typecheck.mypy/mypy.lock>
13:03:27  13:03:27.57 [INFO] Starting: Building 4 requirements for requirements.pex from the 3rdparty/default.lock resolve: click, pantsbuild.pants.testutil==2.21.0, pantsbuild.pants==2.21.0, pytest
13:03:29  13:03:29.32 [INFO] Completed: Building mypy.pex from <resource://pants.backend.python.typecheck.mypy/mypy.lock>
13:03:31  13:03:31.13 [INFO] Completed: Building 4 requirements for requirements.pex from the 3rdparty/default.lock resolve: click, pantsbuild.pants.testutil==2.21.0, pantsbuild.pants==2.21.0, pytest
13:03:31  13:03:31.18 [INFO] Starting: Building requirements_venv.pex
13:03:32  13:03:32.72 [INFO] Completed: Building requirements_venv.pex
13:03:34  13:03:34.63 [INFO] Completed: Typecheck using MyPy - mypy - mypy succeeded.
13:03:34  Success: no issues found in 9 source files
13:03:34  
13:03:34  
13:03:34  
13:03:34  ✓ mypy succeeded.
13:03:34  13:03:34.74 [INFO] Starting: Building pytest.pex from <resource://pants.backend.python.subsystems/pytest.lock>
13:03:34  13:03:34.77 [INFO] Starting: Building 3 requirements for requirements.pex from the 3rdparty/default.lock resolve: pantsbuild.pants.testutil==2.21.0, pantsbuild.pants==2.21.0, pytest
13:03:34  13:03:34.77 [INFO] Starting: Building requirements.pex
13:03:34  13:03:34.86 [INFO] Canceled: Building pytest.pex from <resource://pants.backend.python.subsystems/pytest.lock>
13:03:34  13:03:34.86 [INFO] Starting: Building pytest.pex from <resource://pants.backend.python.subsystems/pytest.lock>
13:03:36  13:03:36.38 [INFO] Completed: Building requirements.pex
13:03:36  13:03:36.52 [INFO] Completed: Building pytest.pex from <resource://pants.backend.python.subsystems/pytest.lock>
13:03:36  13:03:36.55 [INFO] Starting: Building local_dists.pex
13:03:37  13:03:37.55 [INFO] Completed: Building 3 requirements for requirements.pex from the 3rdparty/default.lock resolve: pantsbuild.pants.testutil==2.21.0, pantsbuild.pants==2.21.0, pytest
13:03:38  13:03:38.05 [INFO] Completed: Building local_dists.pex
13:03:38  13:03:38.10 [INFO] Starting: Building pytest_runner.pex
13:03:38  13:03:38.10 [INFO] Starting: Building pytest_runner.pex
13:03:39  13:03:39.64 [INFO] Completed: Building pytest_runner.pex
13:03:39  13:03:39.73 [INFO] Completed: Building pytest_runner.pex
13:03:40  13:03:40.09 [INFO] Completed: Run Pytest - src/.../x:tests - succeeded.
13:03:42  13:03:41.70 [INFO] Completed: Run Pytest - src/.../y:tests - succeeded.
13:03:42  
13:03:42  ✓ src/.../x:tests succeeded in 0.43s.
13:03:42  ✓ src/.../y:tests succeeded in 1.91s.

# --vvvvv--  Package begins here  --vvvvv--

13:03:42  13:03:41.82 [INFO] Starting: Building 1 requirement for x.pex from the 3rdparty/default.lock resolve: click
13:03:42  13:03:41.86 [INFO] Starting: Building build_backend.pex from <resource://pants.backend.python.subsystems/setuptools.lock>
13:03:43  13:03:43.30 [INFO] Completed: Building 1 requirement for x.pex from the 3rdparty/default.lock resolve: click
13:03:43  13:03:43.31 [ERROR] 1 Exception encountered:
13:03:43  
13:03:43  Engine traceback:
13:03:43    in `package` goal
13:03:43  
13:03:43  ProcessExecutionFailure: Process 'Building 1 requirement for x.pex from the 3rdparty/default.lock resolve: click' failed with exit code 102.
13:03:43  stdout:
13:03:43  
13:03:43  stderr:
13:03:43  Could not find a compatible interpreter.
13:03:43  
13:03:43  Examined the following interpreters:
13:03:43  1.) /usr/bin/python2.7 CPython==2.7.18
13:03:43  2.) /usr/bin/python3.8 CPython==3.8.10
13:03:43  
13:03:43  No interpreter compatible with the requested constraints was found:
13:03:43  
13:03:43    Version matches CPython==3.9.*
13:03:43  
13:03:43  
13:03:43  
13:03:43  Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
pantsbuild/pants