https://pantsbuild.org/ logo
#general
Title
# general
p

polite-vase-75369

01/20/2021, 9:23 PM
What does interpreter_search_paths actually do for pants? is that for the python that pants uses itself to run? Or the python pants uses to run python code?
w

witty-crayon-22786

01/20/2021, 9:34 PM
only for the latter (the former is driven exclusively by the
pants
launcher script)
and pants feeds the value of the search path to PEX to drive which interpreter is used.
p

polite-vase-75369

01/20/2021, 9:37 PM
it FEELS like people are seeing their macs pick up different interpreters outside of this setting
we are also on an old pants, so maybe this was fixed (after 1.27?)
w

witty-crayon-22786

01/20/2021, 9:37 PM
there have been further fixes there, yes.
p

polite-vase-75369

01/20/2021, 9:37 PM
im guessing it’s better in 1.30?
w

witty-crayon-22786

01/20/2021, 9:38 PM
possibly. i know that those fixes are in 2.0.x
p

polite-vase-75369

01/20/2021, 9:38 PM
would u recall any weirdness in 1.27 that would cause this? we are actually seeing problems in intellij, which is super weird, but we also cannot see what environment it uses (how mac os starts up intellij)
w

witty-crayon-22786

01/20/2021, 9:39 PM
i’m not precisely sure what “this” is…
p

polite-vase-75369

01/20/2021, 9:40 PM
oh sorry, pants using an incorrect interpreter, one outside of that list in interpreter_search_paths
w

witty-crayon-22786

01/20/2021, 9:41 PM
one other possibility (that i know is fixed in
2.0.x
), is that PEX will also consider the interpreter that it is started under when applying the constraints
and in pre-
2.0.x
, PEX might be started under the python that pants itself is using (…i.e., the one that the
pants
script chooses). that’s still only your “interpreter constraints” match it though
@polite-vase-75369: would you mind refreshing my memory: what’s blocking your upgrade to pants 2?
p

polite-vase-75369

01/20/2021, 9:44 PM
scala support
w

witty-crayon-22786

01/20/2021, 9:44 PM
got it.
p

polite-vase-75369

01/20/2021, 9:47 PM
we’re mostly a scala shop with some python (and we suck at python 😛 )
w

witty-crayon-22786

01/20/2021, 9:48 PM
heh, got it.
h

happy-kitchen-89482

01/20/2021, 10:59 PM
Hmmm someone else had a question about the PATH used when intellij runs pants
yesterday
p

polite-vase-75369

01/20/2021, 10:59 PM
i think that was my coworker lol
he said he is going to try setting the PEX path
p

polite-vase-75369

01/20/2021, 11:00 PM
yep
h

happy-kitchen-89482

01/20/2021, 11:00 PM
So this ends up being a "how does MacOS set the PATH when it runs IntelliJ" question
p

polite-vase-75369

01/20/2021, 11:00 PM
i read that you can set environment variables in a plist file
h

happy-kitchen-89482

01/20/2021, 11:01 PM
Note that the error @mysterious-action-44812 posted was about the interpreter Pants uses to run itself, not your Python code.
Which I think means you need to have the relevant interpreter on PATH
2 Views