dazzling-elephant-33766
05/17/2024, 4:37 PM[GLOBAL]
pants_version = "2.20.1"
backend_packages = [
"pants.backend.python",
"pants.backend.python.providers.experimental.pyenv",
]
[python]
interpreter_constraints = ['==3.11.*']
but if I do pants run app.py
It will fetch a compatible interpreter for me and keep it in a virtualnev
root@a2f5788007ff:/stuff# /root/.local/bin/pants run app.py
Bootstrapping Pants 2.20.1
Installing pantsbuild.pants==2.20.1 into a virtual environment at /root/.cache/nce/edc831b89dbe2507e3e6601f0222f6534ce454293e8ea4a079f14f5e8948dc1f/bindings/venvs/2.20.1
New virtual environment successfully created at /root/.cache/nce/edc831b89dbe2507e3e6601f0222f6534ce454293e8ea4a079f14f5e8948dc1f/bindings/venvs/2.20.1.
⠈ 4.57s Install Python 3.11
app.py
prints the interpreter version
3.11.2 (main, May 17 2024, 16:32:11) [GCC 12.2.0]
/root/.cache/pants/named_caches/pex_root/venvs/s/39253589/venv/bin/python3.11
If I enable resolves and try to generate a lockfile I’d expect it to use this newly installed Python version
[python]
interpreter_constraints = ['==3.11.*']
enable_resolves = true
Instead it breaks
pants generate-lockfiles
When creating a universal lock with an --interpreter-constraint, an interpreter matching the constraint must be found on the local system but none was: Could not find a compatible interpreter.
No interpreters could be found on the system.
How is it run
is able to find + install a correct interpreter for me, but generate-lockfiles
can’t ?broad-processor-92400
05/19/2024, 10:37 PMgenerate-lockfiles
is likely missing some code to hook into the interpreter that run
finds.
Are you interested in trying to fix it?dazzling-elephant-33766
05/20/2024, 4:26 PMdazzling-elephant-33766
05/25/2024, 11:07 PM