https://pantsbuild.org/ logo
m

mysterious-action-44812

02/28/2022, 7:04 PM
anyone ever seen this with pants 1 https://gist.github.com/nitay/eac72579b6be32e9054fc42b83d7869a (yes I know it’s old we cannot update to pants 2)
h

happy-kitchen-89482

02/28/2022, 7:06 PM
Is this on Linux or MacOS?
m

mysterious-action-44812

02/28/2022, 7:06 PM
mac catalina
h

happy-kitchen-89482

02/28/2022, 7:07 PM
This smells of a python interpreter mismatch of some kind
Which Python is this, and how is it installed?
m

mysterious-action-44812

02/28/2022, 7:08 PM
pyenv
3.6.9
h

happy-kitchen-89482

02/28/2022, 7:08 PM
And can you post the command you ran and the entire output (redacting anything that needs redacting...)?
m

mysterious-action-44812

02/28/2022, 7:09 PM
its basically just
pants compile ::
its a fresh new checkout
that gist is the entire resulting output
e

enough-analyst-54434

02/28/2022, 7:11 PM
That looks like virtualenv (https://pypi.org/project/virtualenv/) output to me.
So, @mysterious-action-44812 can you try refreshing the
./pants
script? There have been improvements: https://www.pantsbuild.org/docs/installation#creating-the-launch-script So just:
Copy code
curl -L -O <https://static.pantsbuild.org/setup/pants> && chmod +x ./pants
m

mysterious-action-44812

02/28/2022, 7:14 PM
trying it but that seems to expect pants2 stuff?
e

enough-analyst-54434

02/28/2022, 7:16 PM
It should not.
There are integration tests in CI against pants v1
m

mysterious-action-44812

02/28/2022, 7:16 PM
e.g im getting errors about pants_version in toml we’re still using pants.ini
e

enough-analyst-54434

02/28/2022, 7:16 PM
Aha. What Pants version?
m

mysterious-action-44812

02/28/2022, 7:17 PM
1.27.0
e

enough-analyst-54434

02/28/2022, 7:17 PM
I think that supports toml .... checking.
It does.
Are you willing convert?
m

mysterious-action-44812

02/28/2022, 7:18 PM
whats the conversion look like?
e

enough-analyst-54434

02/28/2022, 7:19 PM
Here was ours - not sure it's too helpful: https://github.com/pantsbuild/pants/pull/9090
m

mysterious-action-44812

02/28/2022, 7:21 PM
it looks similarish format so other than changing the extension what do I need to know?
e

enough-analyst-54434

02/28/2022, 7:21 PM
How about you read up here and ask when you hit holes. It might take a while to explain the format differences: https://v1.pantsbuild.org/options.html
m

mysterious-action-44812

02/28/2022, 7:22 PM
k ill take a look - this is the simplest solution no idea why this started happening all the sudden?
e

enough-analyst-54434

02/28/2022, 7:22 PM
No idea - correct.
m

mysterious-action-44812

02/28/2022, 7:23 PM
ok, whats fixed/better with this new pants script so I can tell folks what we’re getting with this conversion?
e

enough-analyst-54434

02/28/2022, 7:23 PM
And I definitely have no clue my guess is right. This could definitely be totally wrong. Its my best guess from the info you gave,
The fix is it solves problems like this! Maybe! Again, I'm guessing.
I mean, is there anything obvious like you upgraded Pythons recently? It may be you just need to blow away a venv that now points to garbage. I.E.:
rm -rf ~/.cache/pants/setup
.
m

mysterious-action-44812

02/28/2022, 7:29 PM
wait! aha I think that did it
e

enough-analyst-54434

02/28/2022, 7:30 PM
Yeah, so this is a standard virtualenv / venv problem. When the venv gets built it will retain links to the Python used to build it. If that Python is later upgraded - doom.
There is a whole PEP based on this frustration!: https://www.python.org/dev/peps/pep-0582/
m

mysterious-action-44812

02/28/2022, 7:32 PM
where there’s a will there’s a PEP
🙂
anyways thx
h

happy-kitchen-89482

02/28/2022, 8:00 PM
Ah cool, glad that got sorted out
7 Views