I have a problem with OSX that #!/usr/bin/env python3causes environment variables such as library paths (e.g. LD_LIBRARY_PATH). On Linux, it works correctly.
Reading the man page on envdoes not seem to be happening. I only need to modify the environment, if I ask for it, but I do not.
What is a shebang portable string that saves the environment?
Note. I find the problem, because the call subprocess.opento one of my programs out of order because it can not find one of the libraries. However, if I run python interactively, the same call works fine.
source
share