anyone ever seen this with pants 1 <https://gist.g...
# general
m
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
Is this on Linux or MacOS?
m
mac catalina
h
This smells of a python interpreter mismatch of some kind
Which Python is this, and how is it installed?
m
pyenv
3.6.9
h
And can you post the command you ran and the entire output (redacting anything that needs redacting...)?
m
its basically just
pants compile ::
its a fresh new checkout
that gist is the entire resulting output
e
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
trying it but that seems to expect pants2 stuff?
e
It should not.
There are integration tests in CI against pants v1
m
e.g im getting errors about pants_version in toml we’re still using pants.ini
e
Aha. What Pants version?
m
1.27.0
e
I think that supports toml .... checking.
It does.
Are you willing convert?
m
whats the conversion look like?
e
Here was ours - not sure it's too helpful: https://github.com/pantsbuild/pants/pull/9090
m
it looks similarish format so other than changing the extension what do I need to know?
e
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
k ill take a look - this is the simplest solution no idea why this started happening all the sudden?
e
No idea - correct.
m
ok, whats fixed/better with this new pants script so I can tell folks what we’re getting with this conversion?
e
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
wait! aha I think that did it
e
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
where there’s a will there’s a PEP
🙂
anyways thx
h
Ah cool, glad that got sorted out