anyone ever seen this error on an m1 mac (pants 2....
# general
c
anyone ever seen this error on an m1 mac (pants 2.12)?
Copy code
No interpreter compatible with the requested constraints was found:

  A distribution for lxml could not be resolved for /Users/ashu/.pyenv/versions/3.9.10/bin/python3.9.
  Found 1 distribution for lxml that do not apply:
  1.) The wheel tags for lxml 4.9.1 are cp39-cp39-macosx_12_0_arm64 which do not match the supported tags of /Users/ashu/.pyenv/versions/3.9.10/bin/python3.9:
  cp39-cp39-macosx_10_16_arm64
  ... 724 more ...
e
That could be this: https://github.com/pantsbuild/pex/pull/1886 Hard to tell. I don't have a Mac and remotely debugged a similar error just today for Python 2.7.
If that is it, I can assure you I swore more in the last 4 hours than you probably have in the last year.
c
lol
is there a way to get around it
e
I can't think of one besides finding all instances of 3.9 Pythons and ensuring just 1 of them is visible to Pants. The bug I pointed to I think can only happen if you have more than one interpreter of a given major.minor version (on macOS and more complex conditions after that ...).
After doing that you'd need to
rm -rf ~/.cache/pants/named_caches/pex_root/built_wheels
c
uhhh ok
now I see this?:
Copy code
Bootstrapping Pants using /Users/ashu/.pyenv/shims/python3.9
Installing pantsbuild.pants==2.12.0 into a virtual environment at /Users/ashu/.cache/pants/setup/bootstrap-Darwin-arm64/2.12.0_py39
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.12.0 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0)
ERROR: No matching distribution found for pantsbuild.pants==2.12.0
e
You'll need to get your hands dirty here. That is pip failing to find a compatible pants. That line is here: https://github.com/pantsbuild/setup/blob/eb887ad5fd80766214e8c38102a5bc92d1342beb/pants#L376 Perhaps add
-vvv
to get more output or
--log /tmp/debug.log
You may also want to add a line to echo
$ARCHFLAGS
in there. Basically anything you can think of to debug why are these wheels not consdered compatible by the pip in that venv: https://pypi.org/project/pantsbuild.pants/#files