[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

Steve Dower report at bugs.python.org
Tue Feb 4 18:49:08 EST 2020


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

This is intentional. When embedding the Python runtime, you should limit the import directories to those you want to allow - we do not infer *any* from how it is started, due to the security risks.

Modifying the ._pth file after you extract the distro and before you redistribute your own installer is encouraged, especially if you aren't using an "everything in one directory" layout for your application.

If that statement doesn't sound like it applies to you, then you probably want the regular installer and not the embeddable package. It is *not* meant to be a "portable" distribution.

----------
nosy: +steve.dower
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list