[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

Paul Moore report at bugs.python.org
Mon Nov 25 03:05:25 EST 2019


Paul Moore <p.f.moore at gmail.com> added the comment:

The behaviour in this area is different between 3.7.0, 3.7.2, and 3.7.3 (at least). I have reproduced the issue with 3.7.3. Steve Dower made changes to the way the python executable works in venvs in the point releases of 3.7 - see https://github.com/pypa/virtualenv/issues/1380 and https://github.com/pypa/virtualenv/issues/1339 for some discussion of how this affected virtualenv.

I suspect this issue is related - from 3.7.2 onwards, the python.exe in a venv is a redirector which runs the "base" python.exe, but with sys.executable showing the redirector rather than the actual running exe.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38905>
_______________________________________


More information about the Python-bugs-list mailing list