I’m trying to setup a new environment (Windows WSL...
# general
r
I’m trying to setup a new environment (Windows WSL running Ubuntu) - is there a requirement for there to be at least a system Python 3.7/.8/.9 instead of relying on pyenv? I have pyenv installed and 3.10.2 (required by the project that Pants is running) and also installed 3.9.12 and set as global via pyenv but pants can’t find a python interpreter. I have…
Copy code
[python-bootstrap]
search_path = ["<PYENV>"]
and I tried adding
"<PATH>"
but that didn’t help
No valid Python interpreter found…
is the error message
h
is there more to the stacktrace? I'm wondering if this is the
./pants
bash runner script, vs Pants itself
[python-bootstrap].search_path
impacts the interpreters Pants finds to run your own code. It does not impact what is used to run Pants itself
I'm heading to bed, but you can
set -x
at the top of the
./pants
script to get more logging Also you can set the env var
PYTHON
to run Pants w/ a particular Python interpreter: https://github.com/pantsbuild/setup/blob/dfc1a75baa01ee7948a4fd98bf4fd7f32df70797/pants#L26 (or edit the bash script)
r
Yeah, this is just from running
./pants
So yeah,
export PYTHON=/home/jim/.pyenv/versions/3.9.12/bin/python
gets things working
h
Cool. FYI we're discussing at Toolchain today what some of us can focus on next 2-3 weeks to improve onboarding Making it easier to install Pants is one top idea. At least once a week folks have issues with this - it's too complex
b
Hi all! I am trying out Pants from a M1 macbook, using pyenv for python versions and was having some issues with pyenv and pants agreeing on a python executable. Found this little thread, set PYTHON env var and it seems to be working (for now) Thanks!!
👍 1
h
Cool, thanks Santiago. And welcome!