Hi, I am struggling to get pants to run on the pan...
# general
l
Hi, I am struggling to get pants to run on the pants project itself. It runs fine in a new directory and for an example project.
Copy code
~/code/pantsbuild/example-python $ pants
No goals specified.
Use `pants help` to get help.
Use `pants help goals` to list goals.
as expected but
Copy code
~/code/pantsbuild/pants (main) $ pants
[Exit:1] ~/code/pantsbuild/pants (main) $
exits with code 1 and no other output. I installed pants with brew and am running on m2 pro
Copy code
~/code/pantsbuild/pants (main) $ ls -ahl $(which pants)
lrwxr-xr-x@ 1 gauthamnair  admin    59B Aug  4 06:11 /opt/homebrew/bin/pants -> /opt/homebrew/Caskroom/pants/0.8.2/scie-pants-macos-aarch64
~/code/pantsbuild/pants (main) $ arch
arm64
I have been following https://www.pantsbuild.org/docs/contributor-setup . How can I debug further? (or did I set out in the wrong direction?) Thank you.
If I add
pants_version = "2.16.0"
to
[GLOBAL]
in
pants.toml
I do get output but it errors out quickly with
ModuleNotFoundError: No module named 'pants.engine.internals.native_engine'
ah, ok, I think the problem is I was trying to use a separate pants runner rather than the
./pants
bootstrap script in the repo itself.
e
That shouldn't matter. Modern scie-pants (the
pants
binary you brew installed) is 0.8.2 and support for using it in the Pants repo itself was added back in 0.4.0 in February: https://github.com/pantsbuild/scie-pants/releases/tag/v0.4.0
👍 1
l
I finally got back to it. The issue is that pants is looking for a python 3.9 interpeter and can't find it, and a quirk of how the script is set up means that error message does not show up but it just dies. Making a PR with a small tweak to
common.sh
so it shows up.