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.

Title: __PYVENV_LAUNCHER__ breaks calling another venv's interpreter
Type: Stage: resolved
Components: Versions: Python 3.9, Python 3.8, Python 3.7
Status: closed Resolution: duplicate
Dependencies: Superseder: Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile
View: 22490
Assigned To: Nosy List: Ilya.Kulakov, ned.deily, vinay.sajip
Priority: normal Keywords:

Created on 2017-09-06 07:59 by Ilya.Kulakov, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg301454 - (view) Author: Ilya Kulakov (Ilya.Kulakov) * Date: 2017-09-06 07:59
There are 2 venvs. One has the pkg_resources (pkgr_venv) package installed, another (venv) doesn't.

Venv without pkg_resources is currently active.

Works: $ <pkgr_venv>/python -c "import pkg_resources"

Doesn't work: $ python -c "import subprocess; subprocess.check_call(['<pkgr_venv>/python', '-c', 'import pkg_resources'])"

Works: $ python -c "import os, subprocess; env = os.environ.copy(); env.pop('__PYVENV_LAUNCHER__'); subprocess.check_call(['< pkgr_venv>/python', '-c', 'import pkg_resources'], env=env)"
msg367407 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-04-27 07:40
This issue has been fixed in the code for Issue22490 which will be released in Python 3.8.3 and 3.7.8.
Date User Action Args
2022-04-11 14:58:52adminsetgithub: 75544
2020-04-27 07:40:52ned.deilysetstatus: open -> closed
versions: + Python 3.7, Python 3.8, Python 3.9, - Python 3.6
superseder: Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile
messages: + msg367407

resolution: duplicate
stage: resolved
2017-09-06 17:19:21ned.deilysetnosy: + vinay.sajip, ned.deily
2017-09-06 07:59:22Ilya.Kulakovcreate