hi I’m hitting the `Exception message: Could not e...
# general
m
hi I’m hitting the
Exception message: Could not establish identity of /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/pythonwrapper.app/Contents/MacOS/pythonwrapper
that I believe was mentioned elsewhere (see e.g https://github.com/pantsbuild/pants/issues/13451). I am on pants 1.27.0 (yes I know it’s ancient we cannot upgrade to pants 2 as it doesn’t support our languages yet). this happens specifically with
./pants export
which the intellij plugin needs in order to work.
./pants compile
and friends on cmdline work fine. any way we can get the fix mentioned in those PRs, or some other workaround, to resolve this? cc @enough-analyst-54434
b
Just as an aside (I'm a devrel person, not tech support), which languages do you need us to support in the future? Let's make sure we've got that on our radar. :-)
m
JS
b
Oh cool! That's definitely something we're interested in supporting. If you haven't yet participated in the annual community roadmap survey taking place right now, do upvote that to bump it up the priorities.
h
Did anything change on your system that made this happen? I.e., did it work before and now it doesn't?
m
I updated intellij had to redo my project and now it won’t create it b/c of this
whether it ever worked on cmdline dunno, presumably it worked before at some point b/c intellij used to work fine
but to be fair i also havent loaded the project in a while
h
One thing to try as a workaround is to eliminate the macos python (which is nonstandard in some weird ways) from the interpreter search path, and let is use pyenv interpreters instead
let me dig up how to do that in v1
m
ye we’re all pyenv that would be good
h
OK, so in the
[python-setup]
section of
pants.ini
you'd set
interpreter_search_paths = ["<PYENV>"]
which is a special string that says "look in the pyenv interpreter dir. By default that value contains
"<PATH>"
, which means it'll look on the $PATH, which is presumably where it's finding that janky interpreter.
Of course if you merge that it'll do that for everyone, which may not be what you want
You can also do it one-off, for yourself, with
--python-setup-interpreter-search-paths='["<PYENV>"]'
Or set an env var PANTS_PYTHON_SETUP_INTERPRETER_SEARCH_PATHS
m
aha I think that did it, we actually had
interpreter_search_paths
already but we had
+[]
is there a way to see what it expands to and remove just that one?
🙌 1
thank u
h
I think in Pants v1 you did that with
./pants options
? (now it's just
./pants help python-setup
)
h
The default value is
["<PEXRC>", "<PATH>"]
I don't think you can see what the special strings expand to (e.g., what $PATH is)