[issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+
Steve Dower
report at bugs.python.org
Tue Sep 10 12:13:26 EDT 2019
Steve Dower <steve.dower at python.org> added the comment:
The difference is that launching sys._base_executable *without* __PYVENV_LAUNCHER__ set (because env is not being passed) should lose you access to anything installed into the venv. You may also need to import something from the venv in order to see the issue.
Launching sys.executable will hit the launcher that sets the environment variable. Setting the environment correctly and launching sys._base_executable will also load correctly. The latter is theoretically required for correct handle sharing, but that may depend on which Windows version you're running.
I'd like to see both changes in the PR. Just setting the environment variable doesn't really improve the situation at all.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38092>
_______________________________________
More information about the Python-bugs-list
mailing list