```❯ pants pants: The Python 3.11 interpreter at /...
# general
a
Copy code
❯ pants
pants: The Python 3.11 interpreter at /home/bob/.pyenv/shims/python3.11 is an inactive pyenv interpreter
I beg your pardon?
h
Are you using a
pants
runner script instead of https://github.com/pantsbuild/scie-pants ?
a
I don't believe so.
Copy code
❯ curl --proto '=https' --tlsv1.2 -fsSL <https://static.pantsbuild.org/setup/get-pants.sh> | bash

Downloading and installing the pants launcher ...
Installed the pants launcher from <https://github.com/pantsbuild/scie-pants/releases/latest/download/scie-pants-linux-x86_64> to /home/bob/.local/bin/pants
Copy code
❯ which pants
/home/bob/.local/bin/pants
This is only happening in the pants repo itself.
w
Did you recently update your pants toml? Python 3.9 was used to run plugins, and the more recent pants versions use 3.11 - just trying to take that idea off the table
p
That's a pyenv error where pyenv is saying that interpreter can't be used without activating it first.
This is only happening in the pants repo itself.
In CI, or locally? If in CI -- do you have a link to an example workflow run?
a
No, this is on a clean checkout of main on my local machine, cd to the repo,
pants
.
I did create a pyenv virtualenv and activate it, still no joy.
p
Can you run
python3.11 --version
? and maybe
which python3.11
?
Also, try inspecting pyenv's output. On my machine, I have these versions.
Copy code
$ pyenv versions
* system (set by /home/cognifloyd/.pyenv/version)
* 3.6.15 (set by /home/cognifloyd/.pyenv/version)
* 3.7.17 (set by /home/cognifloyd/.pyenv/version)
* 3.8.18 (set by /home/cognifloyd/.pyenv/version)
* 3.9.18 (set by /home/cognifloyd/.pyenv/version)
* 3.11.8 (set by /home/cognifloyd/.pyenv/version)
a
Hmmm... Might have got it, no python3.11 found in the current venv. Thanks for the pointer /nudge:)
p
To "activate" an interpreter (not the venv, but the interpreter), you need to add it with
pyenv local
or
pyenv global
.
Copy code
$ pyenv local
pyenv: no local version configured for this directory
$ pyenv global
system
3.11.8
3.9.18
3.8.18
3.7.17
3.6.15
Run
pyenv global --help
and
pyenv local --help
to get more details about these. 🙂
a
Ja, I had a venv with 3.13 and my system version is also 3.13. Deleted the bad venv, recreated with 3.11, activated and away.
p
Wonderful. I'm glad you got it figured out 🙂
a
So now I'm gonna go see if I can do anything about this https://github.com/pantsbuild/pants/issues/18965 🙂
👖 1
❤️ 1
Before I kill my ml team.
🙈 1
🙉 1
🙊 1
🫠 1
h
Ah yes, the "this is only happening in the Pants repo itself" was the crucial info
pants
delegates to
./pants
in that repo
👍 1