agreeable-shampoo-91351
02/13/2024, 11:32 PMpants.backend.python.providers.experimental.pyenv to backend_packages,
but when I set the following interpreter constraints :
[python]
interpreter_constraints = ["==3.10.*"]
interpreter_versions_universe = ["3.10"]
I'm running into the following error,
stderr:
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.
Examined the following interpreters:
1.) /opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/bin/python3.11 CPython==3.11.5
2.) /opt/homebrew/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/bin/python3.9 CPython==3.9.18
3.) /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9 CPython==3.9.6
No interpreter compatible with the requested constraints was found:
Version matches CPython==3.10.*
I expect pants to provide the compatible python versions(python 3.10 in this case) rather than using the local interpreter. Clearing the cache didn't help too, anyone have any thoughts?
Thanks in advance !broad-processor-92400
02/14/2024, 3:55 AMpants.toml?agreeable-shampoo-91351
02/14/2024, 6:17 PM./pants generate-lockfiles resolve=default
Here are the related contents from my pants.toml
[GLOBAL]
pants_version = "2.17.0"
pythonpath = ["%(buildroot)s/build-support/plugins"]
colors = true
backend_packages = [
"pants.backend.python.lint.pyupgrade",
"pants.backend.python.lint.autoflake",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.isort",
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.pylint",
"pants.backend.python.typecheck.mypy",
"pants.backend.python",
"pants.backend.shell.lint.shellcheck",
"pants.backend.shell.lint.shfmt",
"pants.backend.shell",
"pants.backend.awslambda.python",
"pants.backend.plugin_development",
"pants.backend.python.providers.experimental.pyenv",
"pdlbuild.bundles",
"pdlbuild.pulumi",
"pdlbuild.service",
"pdlbuild.django",
]
[python]
interpreter_constraints = ["==3.10.*"]
interpreter_versions_universe = ["3.10"]
# Mostly to enable codegen functions like manage.py collectstatic
default_run_goal_use_sandbox = false
pip_version = "23.1.2"
# Resolves
enable_resolves = true
default_resolve = "default"
resolves.default = "build-support/lockfiles/default.lock"
resolves_to_interpreter_constraints = { "default" = ["==3.10.*"] }
[python-bootstrap]
search_path = ["<PATH>"]
names = ["python3.10", "python3.9", "python3", "python"]
[subprocess-environment]
# workaround for installing native dependencies on M1 macs
env_vars.add = [
"HDF5_DIR",
"CFLAGS",
"LDFLAGS",
"GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1",
"GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1",
"CI",
]broad-processor-92400
02/14/2024, 7:47 PMbitter-ability-32190
02/14/2024, 7:49 PMpython that points to the pyenv-installed Pythonbitter-ability-32190
02/14/2024, 7:49 PMgenerate-lockfiles process ðŸ˜broad-processor-92400
02/14/2024, 8:13 PMbitter-ability-32190
02/14/2024, 8:19 PMagreeable-shampoo-91351
02/15/2024, 12:08 AM@agreeable-shampoo-91351 ! Is there a chance you make a reduced reproducer and file an issue?Done, https://github.com/pantsbuild/pants/issues/20550
broad-processor-92400
02/15/2024, 10:31 AMagreeable-shampoo-91351
05/02/2024, 6:32 PMbroad-processor-92400
05/02/2024, 10:10 PM