I am developing a PyQT based Windows Application. I have lot of folders with many python files. But when I try to create an executable with the pyinstaller python package,the dependencies of the files in the other folders could not be resolved. For Simplicity, this is my folder structure
gui
-gui.py
-main.py
libs
-testlibs.py
utility
-folderstructure.py
I have used the command pyinstaller main.py --onefile The problem is gui.py imports utility.folderstructure which couldnot be resolved after the exe is generated.
The exe is throwing execption that utility cannot be found.
I have added addition hook directory option. In that I have added a file named hook-gui.py with content hiddenimports=[".utility.folderstructure.*"] Now my folderstructure is
gui
-gui.py
-main.py
-hook-gui.py
libs
-testlibs.py
utility
-folderstructure.py
But while running the command pyinstaller ----additional-hooks-dir=. main.py --onefile
INFO: Loading module hook hook-gui.py... WARNING: Hidden import .utility.folderstructure.* not found! This particular error pops up.
Could you tell where I am wrong?