Skip to content

How to manually include additional modules indirectly needed by the app? #8199

Answered by rokm
tigerinus asked this question in Help
Discussion options

You must be logged in to vote

transformers checks for its dependencies by querying their metadata, so you need to ensure that metadata is collected. E.g., --copy-metadata optimum --copy-metadata auto-gptq on command line, or

from PyInstaller.utils.hooks import copy_metadata

datas = []
datas += copy_metadata('optimum')
datas += copy_metadata('auto-gptq')
...
a = Analysis(
    ...,
    datas=datas,
    ...
)

You can also try using the git HEAD of pyinstaller-hooks-contrib, which has a hook for transformers (and should collect the metadata in question out-of-the-box):

pip uninstall pyinstaller-hooks-contrib
pip install https://github.com/pyinstaller/pyinstaller-hooks-contrib/archive/refs/heads/master.zip

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tigerinus
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