I just tried to upgrade from 2.24 to 2.25 but I’m ...
# general
m
I just tried to upgrade from 2.24 to 2.25 but I’m getting this strange error about not being able to find a compatible interpreter. I am running
pants update-build-files --no-fmt ::
The error points to
Version matches CPython<3.10,>=3.8
which is strange because the only interpreter constraints (defined in
pants.toml
) are:
==3.12.*
and
==3.10.*
😕 error in 🧵
Copy code
Failed to find compatible interpreter on path /Users/jleung/Library/Caches/nce/7af7058f7c268b4d87ed7e08c2c7844ef8460863b3e679db3afdce8bb1eedfae/cpython-3.11.9+20240415-aarch64-apple-darwin-install_only.tar.gz/python/bin/python3.11.

Examined the following interpreters:
1.) /Users/jleung/Library/Caches/nce/7af7058f7c268b4d87ed7e08c2c7844ef8460863b3e679db3afdce8bb1eedfae/cpython-3.11.9+20240415-aarch64-apple-darwin-install_only.tar.gz/python/bin/python3.11 CPython==3.11.9

No interpreter compatible with the requested constraints was found:

  Version matches CPython<3.10,>=3.8
Error: Failed to establish atomic directory /Users/jleung/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/locks/install-ac62c359d15448dbff0c54f2b26031707b83fd2e7353df5224a81643678857e3. Population of work directory failed: Boot binding command failed: exit status: 1

Isolates your Pants from the elements.

Please select from the following boot commands:

<default> (when SCIE_BOOT is not set in the environment)  Detects the current Pants installation and launches it.
bootstrap-tools                                           Introspection tools for the Pants bootstrap process.
update                                                    Update scie-pants.

You can select a boot command by setting the SCIE_BOOT environment variable.
w
Have you updated to the latest scie-pants>?
m
Yes, I have. I updated via brew
Copy code
brew info pants
==> pants: 0.12.3
<https://pantsbuild.org>
Installed
/opt/homebrew/Caskroom/pants/0.12.3 (4MB)
From: <https://github.com/pantsbuild/homebrew-tap/blob/HEAD/Casks/pants.rb>
==> Name
Pants
==> Description
Fast, scalable, user-friendly build system for codebases of all sizes
==> Artifacts
scie-pants-macos-aarch64 -> pants (Binary)
Which looks like it’s 3-mo old … (Jan 20) https://github.com/pantsbuild/homebrew-tap … which is the latest scie-pants (0.12.3)
w
That should be fine - I was just checking why it's looking for python3.11, but can't find it. Pants 2.25 uses Python 3.11, and scie-pants should be installing it
can you delete
.pants.d
in that folder, then run
pants --version
Wow, okay, this was a weird debugging session - I ran on an old repo lying around on my computer, but it was using 2.26.xyz I cleared out some of my caches, and then it downloaded Python 3.9 instead of 3.11 by default. Super weird. What I did to reset everything was:
Copy code
rm -rf .pants.d
rm -rf ~/.cache/pants
rm -rf ~/Library/Caches/nce
Then running again worked as expected. Super bizarre