<#22404 How Pants chooses a concrete Python interp...
# github-notifications
c
#22404 How Pants chooses a concrete Python interpreter New discussion created by salotz I understand the concepts around interpreter constraints, but I don't understand how Pants actually chooses which interpreter to use if there are multiple possible options. For instance if my constraints are just
CPython>=3.11
and I have both 3.11 and 3.12 available (via ASDF in my case) Pants seems to choose 3.11, even though I would rather it choose 3.12 (constraints still being valid). Is there a way for it to output the concrete interpreters that are both available and valid for a target? And are there any heuristics I can use to guess which one it is using by default (or possibly configure a "favored" interpreter?) Secondarily, is there a way to force using a particular version when using various goals? e.g.
Copy code
pants test --python=3.12 ::
pantsbuild/pants