<#23635 2.34.0.dev3 with uv resolver: Tool resolve...
# github-notifications
q
#23635 2.34.0.dev3 with uv resolver: Tool resolves use wrong Python interpreter Issue created by bonauer-pf Describe the bug With
[python].resolver = "uv"
, a tool installed via
install_from_resolve
fails to build if its resolve contains a non-pure-python wheel: Pants version 2.34.0.dev3, it was still working fine with 2.33.0.dev3 OS Linux Additional info Error message when pinning e.g. docformatter to a resolve that declares
docformatter==1.7.8
and then running `pants fmt ::`:
Copy code
A distribution for charset-normalizer could not be resolved for
  ~/.cache/nce/<hash>/cpython-3.14.4+20260414-x86_64-unknown-linux-gnu-install_only.tar.gz/python/bin/python3.14.
Found 1 distribution for charset-normalizer that does not apply:
1.) The wheel tags for charset-normalizer 3.5.0 are cp312-cp312-manylinux_2_17_x86_64, ...
    which do not match the supported tags of .../python/bin/python3.14:
    cp314-cp314-manylinux_2_35_x86_64
It appears that Pants is trying to build the tool PEX using pants' own Python 3.14, rather than the project-declared Python interpreter (in this case 3.12).
pants.toml
that reproduces this (with a docformatter resolve that pins
docformatter==1.7.8
):
Copy code
[GLOBAL]
pants_version = "2.34.0.dev3"
backend_packages = [
  "pants.backend.python",
  "pants.backend.python.lint.docformatter",
]

[python]
interpreter_constraints = ["==3.12.*"]
enable_resolves = true
resolver = "uv"

[python.resolves]
docformatter = "docformatter.lock"

[docformatter]
# docformatter is only special in that it depends on `charset-normalizer`, which
# publishes ABI-specific wheels. Any tool resolve containing a non-pure-python
# wheel reproduces this.
install_from_resolve = "docformatter"
pantsbuild/pants