Open
Description
I'd like to create virtual environments and to do so, i need to fill in the value of home
in pyvenv.cfg
. All implementations I found use the undocumented, private sys._base_executable
. Is there a platform-independent, ideally cross-interpreter way to determine the value of the python home for a new virtualenv using documented APIs?
cpython's venv
modules (pypy contains the same module):
Line 134 in e14930f
On linux/mac, using the parent of the resolved sys.executable
seems to be sufficient, but specifically on windows it isn't clear what to use.