Skip to content

dose pyinstaller pack python module that not used? #6123

Answered by rokm
RonaldinhoL asked this question in Help
Discussion options

You must be logged in to vote

That depends on what "not used" means. If the server part of the package is imported in any of the modules that your code ends up importing (or if those modules end up importing the server-related modules), the server part will get packaged as well (for example, if the package's top-level __init__.py imports both the server and the client side, both will be packaged).

You can always check build/<name>/Analysis-00.toc (or PYZ-00.toc) to see what python modules ended up collected. You could also explicitly exclude the server-related modules using --exclude-module, but that will work only if they are conditionally imported in the modules that triggered their inclusion in the first place (oth…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by RonaldinhoL
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