We’re running into an issue on some developer mach...
# general
r
We’re running into an issue on some developer machines where pants says it can’t find a valid interpreter:
Copy code
No valid Python interpreter found. For `pants_version = "2.6.1rc1"`, Pants requires Python 3.7, 3.8, or 3.9 to run. Please check that a valid interpreter is installed and on your $PATH.
We have set a strict interpreter path to
pyenv
in our pants.toml.
Copy code
[python-setup]
interpreter_search_paths = [
  "<PYENV>"
]
the developer has
3.9.2
listed in their pyenv versions but is not found by pants. For some reason this is not taking precedence when bootstrapping. The developers can run
pyenv global 3.9.2
to force PATH lookup but I thought that the strict interpreter search path would resolve this.
h
Hi! This is confusing that the issue comes from the
./pants
bash script and is talking about the inteprreter to run Pants itself, rather than your code. It does not look at
[python-setup]
. You're not alone in being confused by that https://github.com/pantsbuild/setup/issues/100 To confirm we can get things working, try
PYTHON=path/to/python ./pants --version
, which forces the bash script to a particular interpreter
👍 1
r
ahh okay thank you for the clarification. I will make
pyenv global
apart of the install instructions.