Pyinstaller doesn't include all hidden imports

59 views
Skip to first unread message

Batuhan Altinsoy

unread,
May 10, 2021, 3:18:30 AM5/10/21
to PyInstaller
Hi,

I am using two obfusctaed library in my project, thus pyinstaller hooks can not find all the packages. When I give missing packages as hidden imports they are not included in the dist folder.

I also tried to add custom hooks for missing pakcages but that didn't help.

Is there any way to disable hooks and import everthing given in hidden imports?

I tried 'pyinstaller my.spec' and 'python -m PyInstaller my.spec' and result was the same.

KR
Batuhan A.

bwoodsend

unread,
May 11, 2021, 11:08:52 AM5/11/21
to PyInstaller
You're misunderstanding how PyInstaller works. Packages aren't copied into the dist folder - they're compiled, compressed then baked directly into the EXE - so looking in the dist folder won't tell you anything. It's more likely that PyInstaller just doesn't understand that your obfuscated code is code, in which case you'll have to add it as a data file (which will appear in the dist folder) and be careful to mark any of its dependencies as hidden imports.
Reply all
Reply to author
Forward
0 new messages