[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

Steve Dower report at bugs.python.org
Wed Feb 12 04:17:06 EST 2020


Steve Dower <steve.dower at python.org> added the comment:

> I run into this issue when embedding CPython in a Windows app, and want to use some pre-installed Python, which is not part of the install package...

You'll run into many more issues if you keep doing this...

The way to use a pre-installed Python on Windows is to follow PEP 514 to find and run "python.exe" (or force your users to learn how to configure PATH, which is pretty hostile IMHO, but plenty of apps do it anyway).

If you really need to embed, then add the embeddable package (available from our downloads page) into your distribution and refer to that. Then you can also bundle whatever libraries you need and set up sys.path using the ._pth file.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22213>
_______________________________________


More information about the Python-bugs-list mailing list