I have a script which I execute within a python3 virtual environment and inside this script there is a subrocess.Popen command which starts an application that works only with python2. Is there a way to change the environment only for this process such that this subprocess finds python2 only?
So far I have tried the following which haven't work out.
os.environ["PATH"] = "/path/to/python2/bin:"+os.environ["PATH"]