Hi folks, pants users at my company are often hitt...
# general
c
Hi folks, pants users at my company are often hitting problems with installing 3rd party libraries (example errors below). However, they can actually run
pip install
to install the problematic libraries with no issue. Any suggestions?
Copy code
ERROR: Could not find a version that satisfies the requirement omniduct==1.1.17
ERROR: No matching distribution found for omniduct==1.1.17
Copy code
pex.environment.ResolveError: Failed to resolve requirements from PEX environment @ /Users/user.name/.pex/unzipped_pexes/402fc598cf404ed654017be0d7c53443d79fa859.
Needed macosx_13_0_x86_64-cp-37-cp37m compatible dependencies for:
 1: importlib-metadata>=0.12; python_version < "3.8"
    Required by:
      FingerprintedDistribution(distribution=virtualenv 20.4.7 (/Users/kennethdai/.pex/installed_wheels/bb8d0ead30325881e415ac3e7cbc9080574690a5/virtualenv-20.4.7-py2.py3-none-any.whl), fingerprint='eeaf01de2c4bc1e22cee1a14fd3358ca9251c0c2')
    But this pex had no 'importlib-metadata' distributions.
h
Hi, sorry for the trouble. Which version of Pants is this, and are you using lockfiles?
c
pants_version = “2.13.0” requirement_constraints = “constraints.txt” resolve_all_constraints = false
I’m not sure whether means we are using lockfile or not
c
I would guess this is rooted in python interpreter constraints.. What constraints are you using?
c
interpreter_constraints = [“>=3.7,<3.8”]
The problem is most users have no problem, but there are five or six of them blocked at the above error, and cannot use pants at all.
so the setting should work for most people, but some snowflakes have issues
c
huh.. ok. guess that rules out my hunch 🙂
c
thanks anyway @curved-television-6568
🙏 1
@happy-kitchen-89482 the two issues may not stem from the same root cause, but
No matching distribution found for omniduct==1.1.17
is a more common problem and blocking multiple users. Could you please help?
h
That will be hard to debug without knowing what is different about those users’ system
c
any thing we can try on our side? If
pip install omniduct==1.1.17
works but pants complain
No matching distribution found for omniduct==1.1.17
, is there a way for us to find out the difference between the two? I guess pants invokes pip under the hood, so understanding how pants exactly uses pip could be a starting point?
h
I notice that omniduct is only distributed as an sdist, so maybe there is some issue with its build, that is sensitive to the local environment (pants runs everything in a sandbox, so maybe that is preventing things from working somehow)
Try running with
--no-process-cleanup
, that will keep the sandbox directories, so you can cd into them and see more details
Pants is running pex, which runs pip 20.3.4 under the hood, so try with that version of pip, to be sure it’s apples-to-apples
🙌 1
Does it take a long time before it fails?
c
Yes, it takes a while to build a bunch of stuff until fails. But another user just hit similar error that immediately fail:
Copy code
no matching distribution found for pantsbuild.pants=2.13.0
Pants is running pex, which runs pip 20.3.4 under the hood
is that codified somewhere?
h
We really need a lot more information here
run with
-ldebug
and post as much relevant debug info as possible
And also, think about what changed recently
Is this
omniduct
a new dependency?
What is different about those systems where this fails?
c
Copy code
./pants -ldebug test path/to/a/test.py
Bootstrapping Pants using /Users/user/.pyenv/shims/python3.7
Installing pantsbuild.pants==2.13.0 into a virtual environment at /Users/user/.cache/pants/setup/bootstrap-Darwin-x86_64/2.13.0_py37
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.13.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.13.0
here is what we got with the
ldebug
option.
h
I suggest
rm -rf ~/.cache/pants
and starting over, let’s see what that does
c
rm -rf ~/.cache/pants
I tried that, and hit into the same errors
fwiw, I’m using a M1 macbook and use Rosetta for x86 emulation
h
Rosetta may be the issue
Pants has native m1 support
so you shouldn’t need rosetta
p
Hi @happy-kitchen-89482 I have shared a doc with more contexts of the issue https://docs.google.com/document/d/16HD9o5uTz-5dTnkv-6Yj58udnIf1W5bJk-IaL8uOr0Y/edit#