I am having an issue with setting an environment variable on a call to subprocess.Popen. The environment variable does not seem to be getting set. Any suggestio
You should use os.environ.copy() to make it work. It creates a copy of the entire environment dictionary which you can then modify before passing it on to the subprocess, without modifying the current process environment.