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

Tzu-ping Chung report at bugs.python.org
Sun Nov 24 03:36:19 EST 2019


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

Linux works correctly (Ubuntu with self-compiled Python 3.7.5)

$ python3.7 -m venv fooenv
$ . fooenv/bin/activate
(fooenv) $ python -c "import sys; print(sys.executable)"
/home/uranusjr/fooenv/bin/python
(fooenv) $ python -q
>>> import subprocess
>>> subprocess.check_output(['python', '-c', 'import sys; print(sys.executable)'])
b'/home/uranusjr/fooenv/bin/python\n'

----------

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


More information about the Python-bugs-list mailing list