Skip to content

How to use the executable created from Pyinstaller import new things, for example another python module that are on the PYTHONPATH? #8225

Answered by rokm
KarenMars asked this question in Help
Discussion options

You must be logged in to vote

Like the FAQ states, PYTHONPATH is ignored, so you cannot use it to extend the module search path for PyInstaller-frozen application. But you can (programmatically, at the start of your program) extend sys.path to load modules from external locations.

But to do so, you will need to ensure yourself that external modules' dependencies are available, and that none of those dependencies are partially collected into the frozen application (if you plan to provide a full copy in external location). See https://github.com/orgs/pyinstaller/discussions/8190

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KarenMars
Comment options

Answer selected by KarenMars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants