Besides running the pex and then manually cding th...
# general
p
Besides running the pex and then manually cding there, is there a way to get a pex to run with the wordking directory being the user_code directory; or somehow being able to bake the user_code directory hash into a pex's args?
c
You can tell which root directory to use for your PEX with
PEX_ROOT
if that helps? See this recent thread for example: https://pantsbuild.slack.com/archives/C046T6T9U/p1698950711594649?thread_ts=1698949382.565169&cid=C046T6T9U
p
That doesn't quite help; I want to somehow do "cd ~/.pex/user_code/6d57e0e5fef8172b143cb22369fd3936c39dbf43/" before the pex runs, where I don't know how to actually get at the 6d57e0e5fef8172b143cb22369fd3936c39dbf43 hash I can probably do some sort of wrapper around the pex, but wondering if pants can do something without it
c
what are trying to achieve?
p
mostly trying to get streamlit to play nice with pex. streamlit wants to be run like
streamlit run path/to/python.py
I got
pants run path/to:python
to work locally by baking the
run path/to/python.py
into the args, but when I move the pex to another machine, it turns out it's just running path/to/python.py from the current working directory
c
aha.. there’s no way to start streamlit from within a python environment? otherwise I have no good ideas I’m afraid.. 😬