We are currently on pants 2.15.0 and would like to...
# general
n
We are currently on pants 2.15.0 and would like to upgrade to latest 2.24.0. I am getting this error which doesn't make sense to me when the docs say that 2.24 supports python 3.13, why would it be looking for 3.7 to 3.9? This error happens when creating a docker container with base debian image python:3.11.4-bookworm. Is Is 3.11 not a valid interpreter to use for pants 2.24.0?
Copy code
Step 14/14 : RUN  cd /tmp/bootstrap &&     ./pants --version &&     cd / &&     rm -rf /tmp/bootstrap &&     mkdir /root/.docker &&     touch /root/.docker/config.json
 ---> Running in 02e488423ae7
No valid Python interpreter found. For `pants_version = "2.24.0"`, Pants requires Python 3.7, 3.8, or 3.9 to run. Please check that a valid interpreter is installed and on your $PATH.
I tried installing 3.7.17 in addition which succeeded, but then got this error:
Copy code
Downloading Python-3.7.17.tar.xz...
-> <https://www.python.org/ftp/python/3.7.17/Python-3.7.17.tar.xz>
Installing Python-3.7.17...
patching file Doc/library/ctypes.rst
patching file Lib/test/test_unicode.py
patching file Modules/_ctypes/_ctypes.c
patching file Modules/_ctypes/callproc.c
patching file Modules/_ctypes/ctypes.h
patching file setup.py
patching file 'Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst'
patching file Modules/_decimal/libmpdec/mpdecimal.h
patching file setup.py
Installed Python-3.7.17 to /root/.pyenv/versions/3.7.17
 ---> Removed intermediate container b7b86f9acccb
 ---> 801fec3aa6a2
Step 16/16 : RUN  cd /tmp/bootstrap &&     PATH=$HOME/.pyenv/versions/3.7.17/bin:$PATH ./pants --version &&     cd / &&     rm -rf /tmp/bootstrap &&     mkdir /root/.docker &&     touch /root/.docker/config.json
 ---> Running in 11e6455a205a
Bootstrapping Pants using /root/.pyenv/versions/3.7.17/bin/python3.7
Creating the virtualenv PEX.
Downloading the Pex PEX.
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.62/pex> verified.
Installing pantsbuild.pants==2.24.0 into a virtual environment at /root/.cache/pants/setup/bootstrap-Linux-x86_64/2.24.0_py37
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.24.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, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.27.0, 1.28.0, 1.29.0, 1.30.0, 1.30.1, 1.30.2, 1.30.3, 1.30.4, 1.30.5rc1, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.5.2, 2.6.0, 2.6.1, 2.7.0, 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0rc3, 2.9.0rc4, 2.9.0rc5, 2.9.0rc6, 2.9.0, 2.9.1rc0, 2.9.1rc1, 2.9.1rc2, 2.9.1, 2.9.2rc0, 2.9.2, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0rc4, 2.10.0rc5, 2.10.0, 2.10.1rc0, 2.10.1rc1, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0rc3, 2.11.0rc4, 2.11.0rc5, 2.11.0rc6, 2.11.0, 2.11.1rc0, 2.11.1rc1, 2.11.1rc2, 2.11.1rc3, 2.11.1, 2.12.0a0, 2.12.0rc0, 2.12.0rc1, 2.12.0rc2, 2.12.0rc3, 2.12.0, 2.12.1rc0, 2.12.1rc1, 2.12.1rc2, 2.12.1rc3, 2.12.1rc4, 2.12.1, 2.13.0a0, 2.13.0a1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0rc3, 2.13.0, 2.13.1rc0, 2.13.1rc1, 2.13.1rc2, 2.13.1, 2.14.0a0, 2.14.0a1, 2.14.0rc0, 2.14.0rc1, 2.14.0rc2, 2.14.0rc3, 2.14.0rc4, 2.14.0rc5, 2.14.0, 2.14.1rc0, 2.14.1, 2.14.2rc0, 2.14.2rc1, 2.14.2rc2, 2.14.2, 2.15.0a0, 2.15.0a1, 2.15.0rc0, 2.15.0rc1, 2.15.0rc2, 2.15.0rc3, 2.15.0rc4, 2.15.0rc5, 2.15.0rc6, 2.15.0rc7, 2.15.0, 2.15.1rc0, 2.15.1rc1, 2.15.1rc2, 2.15.1rc3, 2.15.1, 2.15.2rc0, 2.15.2, 2.16.0a0, 2.16.0a1, 2.16.0rc0, 2.16.0rc1, 2.16.0rc2, 2.16.0rc3, 2.16.0rc4, 2.16.0rc5, 2.16.0rc6, 2.16.0rc7, 2.16.0, 2.16.1rc0, 2.16.1rc3, 2.16.1rc4, 2.16.1, 2.17.0.dev0, 2.17.0.dev1, 2.17.0.dev2, 2.17.0.dev3, 2.17.0.dev4, 2.17.0.dev5, 2.17.0a1, 2.17.0rc0, 2.17.0rc1, 2.17.0rc2, 2.17.0rc3, 2.17.0rc4, 2.17.0rc5, 2.17.0, 2.17.1rc0, 2.17.1rc1, 2.17.1rc2, 2.17.1rc3, 2.17.1)
ERROR: No matching distribution found for pantsbuild.pants==2.24.0
g
This looks like you might be running with the old pants launcher. If so, I'd suggest looking at the updated docs and switching to the new workflow. The old style ./pants has been deprecated for a while.
With the new launcher pants ships it's own interpreter as a scie, and so you only need host pythons for the code you develop yourself.
n
ok thanks will have a look.