Antoine Pitrou <pit...@free.fr> added the comment:
Hmm, if multiprocessing exhibits the problem, I wouldn't be surprised if some third-party libraries also do. I think `sys.executable` should really point to the proper executable. > But changing sys.executable to _not_ be the venv one will break anyone who > doesn't correctly inherit environment variables (specifically, > __PYVENV_LAUNCHER__, but this is deliberately not documented ;) ). Well, it will also break if other environment variables are required, e.g. PYTHONPATH. Usually you want to inherit environment variables (including such fundamental stuff such as HOME), because you don't know which ones are actually required for a given workload. So I think "breaking if environment variables are not inherited" is a less severe failure mode than this issue is. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35797> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com