Steve Dower <steve.do...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue38092>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to