https://pantsbuild.org/ logo
#general
Title
# general
j

jolly-kite-50076

02/17/2021, 8:34 PM
Hello folks, I apologize in advance for what I'm going to ask since it relates to an older version (
1.23.0
). One of my projects started randomly failing the build process with pants. This is the more relevant part of the error but I'd be happy to provide the full error if needed. Has anyone else encountered similar issues?
Copy code
New virtual environment successfully created at /aurora/.cache/pants/setup/bootstrap-Linux-x86_64/1.23.0_py38.
18:21:25 [INFO] Resolving new plugins...:
  pantsbuild.pants.contrib.python.checks==1.23.0
/aurora/.cache/pants/setup/bootstrap-Linux-x86_64/1.23.0_py38/lib/python3.8/site-packages/pex/pep425tags.py:274: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
**** Failed to install cryptography-3.4.6 (caused by: NonZeroExit("received exit code 1 during execution of `['/aurora/.cache/pants/setup/bootstrap-Linux-x86_64/pants.wbiSRj/install/bin/python3.8', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpy5ahhlii']` while trying to execute `['/aurora/.cache/pants/setup/bootstrap-Linux-x86_64/pants.wbiSRj/install/bin/python3.8', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpy5ahhlii']`")
):
stdout:

        =============================DEBUG ASSISTANCE==========================
        If you are seeing an error here please try the following to
        successfully install cryptography:

        Upgrade to the latest pip and try again. This will fix errors for most
        users. See: <https://pip.pypa.io/en/stable/installing/#upgrading-pip>
        =============================DEBUG ASSISTANCE==========================


stderr:
Traceback (most recent call last):
  File "<stdin>", line 14, in <module>
  File "<string>", line 14, in <module>
ModuleNotFoundError: No module named 'setuptools_rust'
All I've read points to upgrading pip but since pip is tied to pants, that means upgrading pants which...is not really possible for software been released as far as I know.
h

hundreds-father-404

02/17/2021, 8:37 PM
Hello! You should be able to change the
./pants
bash script to use a newer version of pip
j

jolly-kite-50076

02/17/2021, 8:38 PM
interesting, let me give that a shot
Update: Updating to 1.26.0. Not sure what the fix was but it looks like the latest version of pip was actually being used before.
Copy code
Installing collected packages: pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
Successfully installed pip-21.0.
h

hundreds-father-404

02/18/2021, 7:42 PM
Interesting. 1.25 and 1.26 bring some nice benefits like being able to use file arguments (
./pants test path/to/file.py
) and
pants.toml
j

jolly-kite-50076

02/18/2021, 8:32 PM
good to know thanks! I think I held off on upgrading to a
pants.toml
only version since I thought it might be a challenge but it was a breeze to bump up to
1.26
🙂
🚀 1
h

hundreds-father-404

02/18/2021, 8:44 PM
You can keep using pants.ini until 2.0 🙂 There's a script to automatically migrate ~75% of it also
FYI https://www.pantsbuild.org/docs/how-to-upgrade-pants-2-0 if you're interested in upgrading to 2.x. If you're using Pants mostly for Python, we recommend upgrading for a much nicer experience, including "dependency inference" which cuts BUILD files by ~90%
🙌 1
6 Views