A (quick) question, a couple of my colleagues enco...
# general
g
A (quick) question, a couple of my colleagues encounter the following issue when they use the pants binary at their first time. ❯ ./pants --version Traceback (most recent call last): File "/Users/386162564/miniconda3/envs/brain_toy/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/386162564/miniconda3/envs/brain_toy/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "./pants/__main__.py", line 89, in <module> File "./pants/__main__.py", line 51, in __maybe_run_venv__ File "./pants/__main__.py", line 11, in __re_exec__ FileNotFoundError: [Errno 2] No such file or directory Any idea?
Sorry that I can't reproduce it myself
e
What version of Pants?
g
2.14
e
Ah, right. This is the released Pants PEX re-named ./pants and checked in to your repo?!
g
We don't commit the binary in repo. We download it.
Yep I think if we open the pex, we will see the correct source code
e
Ok, so do you export a custom
PEX_ROOT
?
If not, they can try fixing with
rm -rf ~/.pex
g
Let me ask them to give a try
e
But, you're in a strange world here between conda, which is known not to work with Pants in some cases (M1 Mac I believe) and running from a pants.pex. Better would be to have your download code then install pants.pex as a venv with
PEX_TOOLS=1 ./pants.pex venv some/where ...
And then run
some/where/bin/pants
or
some/where/pex
instead.
The
venv
tool has a few options (see
--help
).
g
Ok I will look further (a little confused atm :)) let me see if rm solves their problems for now.