# general


10/18/2021, 7:59 AM
hey team. An interesting behaviour worth sharing — a MacOS user runs
./pants run project/
. The user has a Python 3.7 interpreter accessible on the
which Pants finds but reports it needs Python 3.8 to run this particular script in the monorepo. User makes an installation of Python 3.8 version (which replaces the Python 3.7 on
) and re-runs
./pants run project/
. Pants can’t still find the new interpreter. Note that user has been successfully able to work with the Pants monorepo when running targets that required Python 3.7 version. What has helped:
$ rm -rf .pids && rm -rf .pants.d
in the local monorepo directory and restart computer, but the issue persists.
$ rm -rf /Users/
and restart. Pants is now able to find the new Python interpreter. Could it be that Pants caches the
version so that any subsequent changes to that shim won’t have any effect unless the
is removed?
The full message:
Copy code
% ./pants run project/
16:06:57.94 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
  File "/Users/", line 234, in _run_inner
    return self._perform_run(goals)
  File "/Users/", line 173, in _perform_run
    return self._perform_run_body(goals, poll=False)
  File "/Users/", line 190, in _perform_run_body
    return self.graph_session.run_goal_rules(
  File "/Users/", line 135, in run_goal_rules
    exit_code = self.scheduler_session.run_goal_rule(
  File "/Users/", line 533, in run_goal_rule
    self._raise_on_error([t for _, t in throws])
  File "/Users/", line 501, in _raise_on_error
    raise ExecutionError(

Exception message: 1 Exception encountered:

  ProcessExecutionFailure: Process 'Find interpreter for constraints: CPython==3.8.*,>=3.6' failed with exit code 102.

Could not find a compatible interpreter.

Examined the following interpreters:
1.) /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/ CPython==2.7.16
2.)                                                                                    /usr/bin/python3 CPython==3.7.3

No interpreter compatible with the requested constraints was found:
  Version matches CPython==3.8.*,>=3.6

(Use --print-stacktrace for more error details and/or --no-process-execution-local-cleanup to inspect chroots and/or -ldebug for more logs. See <> for common issues. Consider reaching out for help: <>)


10/18/2021, 7:51 PM
Ok. Well, that's a bug. Presumably you have no
and just
. If you had the typical `/usr/bin/python{,<major>,<major>.<minor>}`the bug would be masked and evrything would have just worked. I'll file here shortly.


10/18/2021, 8:08 PM
Presumably you have no 
 and just 
That’s right, there is only
. It’s arguably not a common case to use Python shim coming from XCode (I guess people would more often use
on MacOS, but I could be wrong), and updating it in place, so please judge on the amount of time needed to fix appropriately 🙂


10/18/2021, 8:10 PM
Well, I have a special personal dislike for macOS and its shenanigans, but this is important to fix. I've just freed up an old mac laptop from the need to run Linux; so I'll get that set up with macOS to repro and fix.
I think this is the same issue tracked here: I'll take that over and see if I can figure this out.
🙌 1