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

Tzu-ping Chung report at bugs.python.org
Sun Nov 24 04:33:18 EST 2019


Tzu-ping Chung <uranusjr at gmail.com> added the comment:

3.6 works correctly on Windows:

> py -3.6 -m venv test36
> test36\Scripts\activate.bat
>>> import subprocess
>>> print(subprocess.check_output(['python', '-c', 'import sys; print(sys.executable)']))
b'C:\\Users\\uranusjr\\Downloads\\test36\\Scripts\\python.exe\r\n'

So it seems the problem is introduced sometime after.

----------

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


More information about the Python-bugs-list mailing list