This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tdsmith
Recipients jaraco, ned.deily, ronaldoussoren, tdsmith, vinay.sajip
Date 2016-12-22.20:00:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I spoke prematurely; I recently rediscovered that the persistence of __PYVENV_LAUNCHER__ poisons the sys.executable of virtualenv interpreters launched as a subprocess of another Python interpreter:

$ virtualenv -p python3 test
$ test/bin/python3 -c 'import sys; print(sys.executable)'

$ /usr/local/bin/python3 -c 'import subprocess;["/Users/tim/test/bin/python3", "-c", "import sys; print(sys.executable)"])'

$ /usr/local/bin/python3 -c 'import subprocess, os; del os.environ["__PYVENV_LAUNCHER__"];["/Users/tim/test/bin/python3", "-c", "import sys; print(sys.executable)"])'

If __PYVENV_LAUNCHER__ can be unset before script execution begins, that seems ideal.
Date User Action Args
2016-12-22 20:00:39tdsmithsetrecipients: + tdsmith, vinay.sajip, ronaldoussoren, jaraco, ned.deily
2016-12-22 20:00:38tdsmithsetmessageid: <>
2016-12-22 20:00:38tdsmithlinkissue22490 messages
2016-12-22 20:00:38tdsmithcreate