I am trying to run python on a system that does not allow me to set environment variables. Is there a command line flag for python that will install PYTHONHOME? I looked here: http://docs.python.org/release/2.3.5/inst/search-path.html but did not see anything.
So hopefully something like this:
python -magical_path_flag /my/python/install test.py
EDIT
Thanks for all the answers. I am embarrassed to say that I actually meant PYTHONHOME, not PYTHONPATH. (This is what I deserve to ask a question at 1:30 in the morning.) I edited my quesiton.
Here is some more information. I am trying to run python on Android. I can run python -V without problems, but if I try to execute the script, I get:
I/ControlActivity(18340): Could not find platform independent libraries <prefix>
I/ControlActivity(18340): Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Unfortunately, when using ProcessBuilder and changing environment variables on Android, it says that they do not change and throw an exception. I can pass all the command line flags that I want, so I was hoping I could set PYTHONHOME that way.
I tried to create a shell script shell that exports PYTHONHOME and then calls python, but that didn't work. (Received the same error as before.)
Thank,
Gabe
source
share