Stephen Moore added the comment:
I just realised python3 sets it's own __PYVENV_LAUNCHER__ and if you unset it
before calling to os.execv, then the virtualenv has the correct sys.executable.
--
___
Python tracker
<https://bugs.py
Stephen Moore added the comment:
It appears the problem doesn't appear when using python3 -m venv.
Also it seems __PYVENV_LAUNCHER__ is set to the virtualenv's python except when
it's a python3.6 virtualenv and we os.execv from python3.6, where it's set the
system python.
New submission from Stephen Moore :
Hi,
I've come across a problem whereby if you do an os.execv to a python3.6
virtualenv python inside python2.7 vs python3.6 then the resulting python
session has a different sys.executable.
Where if you os.execv from python2.7 the sys.executable is