Any idea why this `pants package` might be failing...
# general
e
Any idea why this
pants package
might be failing complaining about pip version?
pip: ERROR: Could not find a version that satisfies the requirement pip==24.0
Full error in thread
Copy code
Step #1 - "build-pants": 21:48:37.36 [INFO] Starting: Building local_dists.pex
Step #1 - "build-pants": 21:48:38.73 [INFO] Completed: Building local_dists.pex
Step #1 - "build-pants": 21:48:38.98 [INFO] Starting: Building 12 requirements for backend.billing/batch_pipeline.pex from the 3rdparty/python/beam.lock resolve: apache-beam[gcp]==2.61.0, ddtrace==2.17.0, enum-tools==0.12.0, frozendict==2.4.6, google-aut... (162 characters truncated)
Step #1 - "build-pants": 21:48:42.78 [INFO] Completed: Building 12 requirements for backend.billing/batch_pipeline.pex from the 3rdparty/python/beam.lock resolve: apache-beam[gcp]==2.61.0, ddtrace==2.17.0, enum-tools==0.12.0, frozendict==2.4.6, google-aut... (162 characters truncated)
Step #1 - "build-pants": 21:48:42.78 [ERROR] 1 Exception encountered:
Step #1 - "build-pants": 
Step #1 - "build-pants": Engine traceback:
Step #1 - "build-pants":   in `package` goal
Step #1 - "build-pants": 
Step #1 - "build-pants": ProcessExecutionFailure: Process 'Building 12 requirements for backend.billing/batch_pipeline.pex from the 3rdparty/python/beam.lock resolve: apache-beam[gcp]==2.61.0, ddtrace==2.17.0, enum-tools==0.12.0, frozendict==2.4.6, google-auth==2.30.0, google-cloud-bigquery==3.24.0, google-cloud-secret-manager==2.20.0, httpx==0.27.0, once-py==0.0.5, polars==1.17.1, requests==2.32.3, sqlalchemy==2.0.30' failed with exit code 1.
Step #1 - "build-pants": stdout:
Step #1 - "build-pants": 
Step #1 - "build-pants": stderr:
Step #1 - "build-pants": pid 80 -> /builder/home/.cache/pants/named_caches/pex_root/venvs/a1a0a2cea735cc36f072dcdb4f5a64cf915a4142/3bd8dd039b6717ea08ba315fc4068d8debf47674/bin/python -sE /builder/home/.cache/pants/named_caches/pex_root/venvs/a1a0a2cea735cc36f072dcdb4f5a64cf915a4142/3bd8dd039b6717ea08ba315fc4068d8debf47674/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /builder/home/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache --log /tmp/pants-sandbox-8fudNJ/.tmp/pex-pip-log.6p2ilaey/pip.log download --dest /builder/home/.cache/pants/named_caches/pex_root/downloads/resolver_download.tf8mk27p/usr.local.bin.python3.11 pip==24.0 setuptools==68.0.0 wheel==0.42.0 --index-url <https://oauth2accesstoken>:ya29.c.c0ASRK0Gb-r9wsZl-rzFmLR7BkEsB2zX_5p2D-DEZctzle8MChUd6PYWxI9cwj6yxuTxr32q5NGHb7kJBx-4Ta8niSWZWpXxSPuhSVyBFPm1RFAyFsTsSFU0WB24EQgRR9jt0MQVbR6vSA3goBqeVzmzV5H_SXkzhVb8wy2mPF1dCuBzgo1Aj4NOKokH-54Z8hxcRzcHakNMvUYhzZ4gLPLqMVJEWavwMlqhg3e17tvtVJjrOpZKC9tcRtbE9s4kAMNtpWQ1e-MrcdBp2wzmTqTFlmSTr-y8d38clNL_HT9PBIMKBmeKtMnTssW6Su97y-GRj-zGWX6bsnSabZzgi2cPfQy_n1gN9N33ecyTP8_gE371Pl2I3-W9Fd0pe-nJ0Bw31uunOq0rj8x-dnomIfJlh_pzRxrczQuZmv8Ohrzq7ftmYuWMvrpy55XasSYV2jgnejox0q7B9_-59V_iUIr92mknMZx9SguqBUuYn3SOmYjFl14-3tuZ-ij2kxQV1ig1s1oakQ2-5lc07f1UZR4RW-RVzbgsfoh3buuttzpFqb3nkrieRsRRO__0ouZFw5bilB2thm_6egaVs-OSXjif_u0XUnVaMYSp6JRSs5mn3SrsOrJWbfdpM-B05cXd6qMfhlB9wsmmOm0aZsuXRll9nmcnWnM8XI6ugvtz466OOidhkeFjh8d6g20S4iwft_U87skfwcl1hanYiQ52gqYxFXmgqfwYwuk1r_3F78IjeORg7I-tl56fsxsqj4-gn2vJ-tz0S_n06VbYqOzwo_x2R3bX-eUJnelxapQRMQf-FSSeIFvYFbmfm3V8BYBnzM-RjQixOrl_nmzVXXdUz9-sOyoBStRc5eRktslXyiIXy5e_qf6OYgqS_XoxBB_wkfhjUJJbgmzBSyztvbos_nFiW4s2ypa7djIc6orMR3f_Mv42Mwf5waM_BwaXq1lj1XmdSIZ8tVnSo3kd5a1zd9RSIa8If1M5oSFjI8vv0mYycU1umSM-6zufS@us-central1-python.pkg.dev/delfina-gaia-dev/billing-pipeline-pypi-cache/simple/ --retries 5 --timeout 15 exited with 1 and STDERR:
Step #1 - "build-pants": pip: ERROR: Could not find a version that satisfies the requirement pip==24.0
Step #1 - "build-pants": pip: ERROR: No matching distribution found for pip==24.0
Step #1 - "build-pants": 
Step #1 - "build-pants": 
Step #1 - "build-pants": 
Step #1 - "build-pants": Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
Step #1 - "build-pants":
For context, this is a
pants package
that I'm running inside of a google cloud builder, so I'm not sure what the VM looks like, and if it's missing an external dependency that pants relies on
w
It looks like it’s using pip 20.3.4-patched. Are you using scie-pants? Which pants version? Which pex version? What pip settings?
e
pants version 2.23.1 Just using normal
pants
installed in the following Dockerfile:
Copy code
FROM python:${PY_VERSION}-bookworm

RUN export DEBIAN_FRONTEND=noninteractive \
    && apt-get update \
    && apt-get -y upgrade \
    && apt-get -y install --no-install-recommends  \
    curl ca-certificates

ENV PATH="/root/.local/bin:$PATH"
RUN curl --proto '=https' --tlsv1.2 -fsSL <https://static.pantsbuild.org/setup/get-pants.sh> | bash

ENTRYPOINT [ "pants" ]
I haven't overridden any default settings for pex or pip I don't think
w
Yeah, that’s the pants script I guess - I don’t use that, so I’m not too sure. To be safe, I like to fix the pex version so I’m always using a recent one - as Pants default pex lags pex itself, but you might have to re-generate lock files https://www.pantsbuild.org/stable/reference/subsystems/pex-cli#version https://www.pantsbuild.org/stable/reference/subsystems/pex-cli#known_versions https://www.pantsbuild.org/stable/docs/python/overview/pex#setting-pex-and-pip-versions
pip_version=latest
might be the default, so it might be easy enough to just update the pex version, and that should come with some nice perf boosts too
And here’s the pex versions: https://github.com/pex-tool/pex/releases
e
Thanks! I'll try updating the pex version and see if that fixes things