I'm sorry in advance if this is a stupid question....
# general
f
I'm sorry in advance if this is a stupid question. I am trying to update the version of pants in our repo. We are currently running 2.8, and I see the stable version is 2.11. Following the advice on the following documentation page, I am trying to update one minor release at a time. So I am starting with trying update to 2.9 https://www.pantsbuild.org/docs/upgrade-tips#check-for-updates-to-the-pants-script I started by updating the pants executable with
curl -L -o ./pants <https://pantsbuild.github.io/setup/pants>
Then I updated the pants.toml file with
pants_version = "2.9.0"
I did
./pants package ::
And it packaged everything fine. But then I tried testing it by opening a repl environment for one of our modules, and I got the following error:
Copy code
Traceback (most recent call last):
  File "/home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/efa8689a6db824683c0e9ee4a5e73ff156ff5c7b/.bootstrap/pex/pex.py", line 475, in execute
    self.activate()
  File "/home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/efa8689a6db824683c0e9ee4a5e73ff156ff5c7b/.bootstrap/pex/pex.py", line 139, in activate
    self._activated_dists = self._activate()
  File "/home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/efa8689a6db824683c0e9ee4a5e73ff156ff5c7b/.bootstrap/pex/pex.py", line 126, in _activate
    activated_dists.extend(env.activate())
  File "/home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/efa8689a6db824683c0e9ee4a5e73ff156ff5c7b/.bootstrap/pex/environment.py", line 322, in activate
    self._activated_dists = self._activate()
  File "/home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/efa8689a6db824683c0e9ee4a5e73ff156ff5c7b/.bootstrap/pex/environment.py", line 673, in _activate
    resolved = self.resolve()
  File "/home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/efa8689a6db824683c0e9ee4a5e73ff156ff5c7b/.bootstrap/pex/environment.py", line 506, in resolve
    for fingerprinted_distribution in self.resolve_dists(all_reqs)
  File "/home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/efa8689a6db824683c0e9ee4a5e73ff156ff5c7b/.bootstrap/pex/environment.py", line 593, in resolve_dists
    raise ResolveError(
pex.environment.ResolveError: Failed to resolve requirements from PEX environment @ /home/jovyan/.cache/pants/named_caches/pex_root/unzipped_pexes/3e4b475b418d085af3053314f8241f840264d4f0.
Needed manylinux_2_31_x86_64-cp-39-cp39 compatible dependencies for:
 2: nltk~=3.6.6
    Required by:
      FingerprintedDistribution(distribution=rml.carbon 0.1 (/home/jovyan/.cache/pants/named_caches/pex_root/installed_wheels/15626b0a0261f72c5c4e829cb0d8707f2b069261/rml.carbon-0.1-py3-none-any.whl), fingerprint='a93da96c5715158b8b7541015377158cad5692c9')
    But this pex had no 'nltk' distributions.
 3: pandas~=1.2
    Required by:
      FingerprintedDistribution(distribution=rml.carbon 0.1 (/home/jovyan/.cache/pants/named_caches/pex_root/installed_wheels/15626b0a0261f72c5c4e829cb0d8707f2b069261/rml.carbon-0.1-py3-none-any.whl), fingerprint='a93da96c5715158b8b7541015377158cad5692c9')
    But this pex had no 'pandas' distributions.
 5: numpy~=1.21
    Required by:
      FingerprintedDistribution(distribution=rml.core 0.1 (/home/jovyan/.cache/pants/named_caches/pex_root/installed_wheels/b5e675ffbf812888399c77f2e4ce4c5e7f6034b8/rml.core-0.1-py3-none-any.whl), fingerprint='6103b379e4791b5c147d607fef034c0a5c6fd799')
    But this pex had no 'numpy' distributions.
 6: cleanco==2.1
    Required by:
      FingerprintedDistribution(distribution=rml.processing 0.1 (/home/jovyan/.cache/pants/named_caches/pex_root/installed_wheels/51eda90b701c0f406efbc2b5818b80669e4d004a/rml.processing-0.1-py3-none-any.whl), fingerprint='36f8f58abea538996450e98addd0032d4d9892be')
    But this pex had no 'cleanco' distributions.
 7: setuptools~=59.4.0
    Required by:
      FingerprintedDistribution(distribution=rml.carbon 0.1 (/home/jovyan/.cache/pants/named_caches/pex_root/installed_wheels/15626b0a0261f72c5c4e829cb0d8707f2b069261/rml.carbon-0.1-py3-none-any.whl), fingerprint='a93da96c5715158b8b7541015377158cad5692c9')
    But this pex had no 'setuptools' distributions.
I had to remove some of the traceback which showed proprietary info, but hopefully the error is clear. I am not sure how to handle these errors, since the requirements were imported fine before the pants update, so I think I might have missed a step or done something wrong. Could anyone please provide some advice on how I can resolve this? Thanks
h
There are none
f
Hahaha sorry I accidentally hit enter which sent just the first line before typing the rest of the post.
h
Oh I meant there are no stupid questions!
1
🙏 1
b
Yeah, we don't believe in shaming people here for having questions. Pffft.
c
hehe.. you get more replies about your question not being stupid, than for your actual question 😛 but I was about to say the same…
I’m sorry in advance if this is a stupid question.
No such thing here 😉
You are correct in upgrading one minor step at a time, that way you can address any deprecations etc. Regarding missing setuptools, that sound familiar, but I can’t recall if it was for
repl
or something else. Perhaps @hundreds-father-404 knows?
h
Unrelated to your problem, but FYI you don't need to upgrade the pants runner script (https://pantsbuild.github.io/setup/pants) when you update the pants version
Interesting that package worked fine but specfically repl didn't
When you say "opening a repl environment" you mean you did
./pants repl path/to/package
or similar?
f
Yes, that's exactly what I'm doing, in a bash terminal. More specifically, I am using the :dist target.
./pants repl path/to/package:dist
Additionally, when I try to run our pytest testing suite for a package with
./pants test path/to/package:tests
I get the same error. Package always works fine, though.