cold-vr-15232
04/04/2023, 1:34 PMinterpreter_constraints=[">=3.8,<3.9"]
. There is no docs for this, so maybe there is some configuration that needs to be done?sparse-lifeguard-95737
04/04/2023, 1:39 PMsparse-lifeguard-95737
04/04/2023, 1:39 PMbitter-ability-32190
04/04/2023, 2:13 PMbitter-ability-32190
04/04/2023, 2:13 PMbitter-ability-32190
04/04/2023, 2:14 PMcold-vr-15232
04/04/2023, 2:14 PMcold-vr-15232
04/05/2023, 7:24 AM[GLOBAL]
pants_version = "2.16.0rc0"
backend_packages = [
# Any of the following three backends install python 3.7
"pants.backend.build_files.fmt.black",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.isort",
#
"pants.backend.python",
"pants.backend.experimental.python",
"pants.backend.python.providers.experimental.pyenv",
]
[python]
interpreter_constraints=[">=3.8,<3.9"]
Also, "pants.backend.python.typecheck.mypy" will use 3.8 but fails because it can't find module _sqlite3.
File "/home/vdumitre/.cache/pants/named_caches/pyenv/versions/3.8.16/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
bitter-ability-32190
04/05/2023, 2:58 PMcold-vr-15232
04/05/2023, 4:14 PMbitter-ability-32190
04/05/2023, 4:16 PMbroad-processor-92400
04/05/2023, 7:56 PMbitter-ability-32190
04/05/2023, 8:55 PMbrash-family-72057
04/06/2023, 11:41 PM[GLOBAL]
pants_version = "2.16.0rc0"
backend_packages = [
...
"pants.backend.python.providers.experimental.pyenv",
]
...
[python]
interpreter_constraints = ["CPython>=3.10,<3.11"]
When running the package command, I see that it installs python 3.10:
15:58:10.20 [INFO] Completed: Choose specific version for Python 3.10
16:00:14.27 [INFO] Completed: Install Python 3.10
I didn’t have python 3.10 installed on my machine (which is why I chose it for this test):
❯ pyenv versions
system
3.9.10
* 3.11.2 (set by /Users/vzakharov/mdevxp/.python-version)
When I run the resulting pex, I get this error:
❯ ./dist/src.python.mdevxp.health_score/health_score_processor.pex --help
pyenv: python3.9: command not found
The `python3.9' command exists in these Python versions:
3.9.10
Note: See 'pyenv help global' for tips on allowing both
python2 and python3 to be found.
looking inside the pex, I see that __main__.py
starts with
#!/usr/bin/env python3.9
Let me know if you’d like more info on this.bitter-ability-32190
04/07/2023, 12:09 AMbrash-family-72057
04/07/2023, 5:30 AMbitter-ability-32190
04/07/2023, 2:12 PMbitter-ability-32190
04/07/2023, 2:14 PMbrash-family-72057
04/07/2023, 7:45 PMbitter-ability-32190
04/07/2023, 7:49 PM