rapid-bird-79300
07/28/2021, 9:57 PM16:29:49.96 [INFO] Starting: Building isort.pex with 2 requirements: isort[pyproject]>=5.5.1,<5.6, setuptools
16:30:01.34 [INFO] Completed: Building isort.pex with 2 requirements: isort[pyproject]>=5.5.1,<5.6, setuptools
16:30:01.34 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/Users/developer/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 234, in _run_inner
return self._perform_run(goals)
File "/Users/developer/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 173, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/developer/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 190, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/developer/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.1rc3_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/developer/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.1rc3_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/developer/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 489, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
Engine traceback:
in select
in pants.core.goals.fmt.fmt
in pants.backend.python.lint.python_fmt.format_python_target
in pants.core.goals.fmt.enrich_fmt_result
in custom_isort.rules.isort_fmt
in custom_isort.rules.setup_isort
in pants.backend.python.util_rules.pex.create_venv_pex (isort.pex)
in pants.backend.python.util_rules.pex.build_pex (isort.pex)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/Users/developer/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/engine/process.py", line 253, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building isort.pex with 2 requirements: isort[pyproject]>=5.5.1,<5.6, setuptools' failed with exit code 1.
stdout:
the solution for the above error was to upgrade pip but this is not obvious to most developers.
My troubleshooting for pants errors usually goes like this:
1. what’s your python version
2. clear pants cache
3. try upgrading pip
4. try a virtualenv
5. if none above work just run lint checks directly to unblock (not ideal)
Developers environments are widely different, most of the time it’s a battle of python versions and path issues. I’m not sure if there are any good solutions for this but I wanted to share some of experiences so far. Any suggestions to improve our consistency across environments would be greatly appreciated.enough-analyst-54434
07/28/2021, 10:05 PMrapid-bird-79300
07/28/2021, 10:11 PMFile "/Users/oshin/.pyenv/versions/3.8.0/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pip._internal.cli.main'
clean-city-64472
07/28/2021, 10:14 PMrapid-bird-79300
07/28/2021, 10:16 PMclean-city-64472
07/28/2021, 10:24 PMclean-city-64472
07/28/2021, 10:25 PM/usr/bin/python
is not symlinked to python3 you get a totally indecipherable errorclean-city-64472
07/28/2021, 10:26 PMclean-city-64472
07/28/2021, 10:26 PMclean-city-64472
07/28/2021, 10:30 PM1. can you run `./pants` with no args
2. can you run `./pants test <very simple test with few deps>`
3. can you run `./pants test <complex test>
4. `./pants test ::`
rapid-bird-79300
07/28/2021, 10:38 PM18:30:47.92 [INFO] Initialization options changed: reinitializing scheduler...
18:30:48.41 [INFO] Scheduler initialized.
18:30:54.36 [WARN] Completed: fmt - isort made changes.
Fixing app/payroll_filing/peo_filing/tests/test_filing_entity_resolver.py
18:30:55.42 [INFO] Starting: Building black.pex with 2 requirements: black==21.5b1, setuptools
18:30:57.44 [INFO] Completed: Building black.pex with 2 requirements: black==21.5b1, setuptools
18:30:57.45 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 234, in _run_inner
return self._perform_run(goals)
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 173, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 190, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 530, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 489, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
Engine traceback:
in select
in pants.core.goals.fmt.fmt
in pants.backend.python.lint.python_fmt.format_python_target
in pants.core.goals.fmt.enrich_fmt_result
in custom_black.rules.black_fmt
in custom_black.rules.setup_black
in pants.backend.python.util_rules.pex.create_venv_pex (black.pex)
in pants.backend.python.util_rules.pex.build_pex (black.pex)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/engine/process.py", line 253, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building black.pex with 2 requirements: black==21.5b1, setuptools' failed with exit code 1.
stdout:
stderr:
ERROR: Could not find a version that satisfies the requirement black==21.5b1
ERROR: No matching distribution found for black==21.5b1
pid 10938 -> /Users/sudhirkrishnakumar/.cache/pants/named_caches/pex_root/venvs/18b38500670558526e7bc85934f52e4c520a1fff/01df9bfe21d17113e3309daa4a1e72cea458c76f/pex --disable-pip-version-check --no-python-version-warning --exists-action a --use-feature 2020-resolver --isolated -q --cache-dir /Users/sudhirkrishnakumar/.cache/pants/named_caches/pex_root --log /private/var/folders/y5/cdtnvhmj08gb0jsf0f1lcqnc0000gn/T/process-executionlUYnaV/.tmp/tmpvuvUyw/pip.log download --dest /private/var/folders/y5/cdtnvhmj08gb0jsf0f1lcqnc0000gn/T/process-executionlUYnaV/.tmp/tmpLZd0T4/usr.local.Cellar.python@2.2.7.17_1.Frameworks.Python.framework.Versions.2.7.bin.python2.7 black==21.5b1 setuptools --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
None
Traceback (most recent call last):
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 234, in _run_inner
return self._perform_run(goals)
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 173, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 190, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 530, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 489, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:
Engine traceback:
in select
in pants.core.goals.fmt.fmt
in pants.backend.python.lint.python_fmt.format_python_target
in pants.core.goals.fmt.enrich_fmt_result
in custom_black.rules.black_fmt
in custom_black.rules.setup_black
in pants.backend.python.util_rules.pex.create_venv_pex (black.pex)
in pants.backend.python.util_rules.pex.build_pex (black.pex)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/Users/sudhirkrishnakumar/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.wUoEMw/install/lib/python3.9/site-packages/pants/engine/process.py", line 253, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building black.pex with 2 requirements: black==21.5b1, setuptools' failed with exit code 1.
stdout:
stderr:
ERROR: Could not find a version that satisfies the requirement black==21.5b1
ERROR: No matching distribution found for black==21.5b1
pid 10938 -> /Users/sudhirkrishnakumar/.cache/pants/named_caches/pex_root/venvs/18b38500670558526e7bc85934f52e4c520a1fff/01df9bfe21d17113e3309daa4a1e72cea458c76f/pex --disable-pip-version-check --no-python-version-warning --exists-action a --use-feature 2020-resolver --isolated -q --cache-dir /Users/sudhirkrishnakumar/.cache/pants/named_caches/pex_root --log /private/var/folders/y5/cdtnvhmj08gb0jsf0f1lcqnc0000gn/T/process-executionlUYnaV/.tmp/tmpvuvUyw/pip.log download --dest /private/var/folders/y5/cdtnvhmj08gb0jsf0f1lcqnc0000gn/T/process-executionlUYnaV/.tmp/tmpLZd0T4/usr.local.Cellar.python@2.2.7.17_1.Frameworks.Python.framework.Versions.2.7.bin.python2.7 black==21.5b1 setuptools --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
None
I agree caching seems to be a big pain point too, I always assume they have been running some goals before troubleshooting that put them in a weird state where we should just clear out the cache.rapid-bird-79300
07/28/2021, 10:39 PM/usr/bin/python
points to python2.7 on our macbooks and some had it installed via homebrew which I think some how contributed to that problemclean-city-64472
07/28/2021, 10:41 PMpantsd
processes.witty-crayon-22786
07/28/2021, 11:14 PMwitty-crayon-22786
07/28/2021, 11:15 PM[python-setup]
# Avoid system python.
interpreter_search_paths = ["<PYENV>"]
witty-crayon-22786
07/28/2021, 11:15 PMwitty-crayon-22786
07/28/2021, 11:16 PM/usr/bin/python
, macOS system python, your PATH, etcwitty-crayon-22786
07/28/2021, 11:17 PMwitty-crayon-22786
07/28/2021, 11:19 PMpip
inside that venv to not be found.witty-crayon-22786
07/28/2021, 11:19 PMxcode-select
), but will create that issue now.witty-crayon-22786
07/28/2021, 11:20 PM~/.cache/pants/named_caches/pex_root
witty-crayon-22786
07/28/2021, 11:45 PMrapid-bird-79300
07/29/2021, 12:43 AMrapid-bird-79300
08/04/2021, 6:50 PMEngine traceback:
in select
in pants.init.plugin_resolver.resolve_plugins (CPython==3.9.4)
in pants.backend.python.util_rules.pex.create_venv_pex (pants_plugins.pex)
in pants.backend.python.util_rules.pex.build_pex (pants_plugins.pex)
in pants.backend.python.util_rules.pex.find_interpreter (CPython==3.9.4)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/Users/njgrisafi/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.9ZYntu/install/lib/python3.9/site-packages/pants/engine/process.py", line 253, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Find interpreter for constraints: CPython==3.9.4' failed with exit code 102.
stdout:
stderr:
Could not find a compatible interpreter.
Examined the following interpreters:
1.) /Users/njgrisafi/.pyenv/versions/3.6.10/bin/python3.6 CPython==3.6.10
2.) /Users/njgrisafi/.pyenv/versions/3.7.10/envs/3.7/bin/python3.7 CPython==3.7.10
3.) /Users/njgrisafi/.pyenv/versions/3.8.8/bin/python3.8 CPython==3.8.8
4.) /Users/njgrisafi/.pyenv/versions/3.9.2/bin/python3.9 CPython==3.9.2
No interpreter compatible with the requested constraints was found:
Version matches CPython==3.9.4
curious why 3.9.4? We don’t set any constraints.rapid-bird-79300
08/04/2021, 6:51 PMwitty-crayon-22786
08/04/2021, 6:54 PMwitty-crayon-22786
08/04/2021, 6:55 PMpants
script's options to select an interpreter. I'll see if we can fix that one in a cherry pick.rapid-bird-79300
08/04/2021, 6:55 PM[python-setup]
interpreter_search_paths = [
"<PYENV>"
]
so idk where else that could have came fromwitty-crayon-22786
08/04/2021, 6:56 PMrapid-bird-79300
08/04/2021, 6:58 PMrapid-bird-79300
08/04/2021, 7:02 PMpyproject.toml
rapid-bird-79300
08/04/2021, 7:06 PMwitty-crayon-22786
08/04/2021, 10:28 PMpants
script? Basically, you'd need to have the pants
script also use pyenvrapid-bird-79300
08/04/2021, 10:34 PMinterpreter_constraints
in pants.toml. Would I update the determine_default_python_exe
function via https://raw.githubusercontent.com/pantsbuild/setup/gh-pages/pants?witty-crayon-22786
08/04/2021, 10:44 PMwitty-crayon-22786
08/04/2021, 10:44 PMPYTHON=…
to choose the interpreter used by the scriptrapid-bird-79300
08/04/2021, 10:52 PMPYTHON=$HOME/.pyenv/versions/3.9.2/bin/python
. Output looks a bit difference but I still see an error
Examined the following interpreters:
1.) /Users/njgrisafi/.pyenv/versions/3.6.10/bin/python3.6 CPython==3.6.10
2.) /Users/njgrisafi/.pyenv/versions/3.7.10/envs/3.7/bin/python3.7 CPython==3.7.10
3.) /Users/njgrisafi/.pyenv/versions/3.8.8/bin/python3.8 CPython==3.8.8
4.) /Users/njgrisafi/.pyenv/versions/3.9.2/bin/python3.9 CPython==3.9.2
No interpreter compatible with the requested constraints was found:
Version matches CPython==3.9.4
(Use --no-process-execution-local-cleanup to inspect chroots and/or -ldebug for more logs. See <https://www.pantsbuild.org/v2.6/docs/troubleshooting> for common issues. Consider reaching out for help: <https://www.pantsbuild.org/v2.6/docs/getting-help.>)
witty-crayon-22786
08/04/2021, 10:53 PM~/.cache/pants/setup
, since it’s only a patch version change in the interpreter from 3.9.2 to 3.9.4witty-crayon-22786
08/04/2021, 10:55 PMwitty-crayon-22786
08/04/2021, 10:55 PMrapid-bird-79300
08/04/2021, 10:56 PMrapid-bird-79300
08/04/2021, 10:56 PMwitty-crayon-22786
08/04/2021, 10:56 PMwitty-crayon-22786
08/04/2021, 10:57 PMrapid-bird-79300
08/04/2021, 10:59 PMrapid-bird-79300
08/06/2021, 5:25 PMwitty-crayon-22786
08/06/2021, 5:26 PM