I read every manual and answers here, but still don't understand Pyinstaller's behavior.
I'd edited a .spec file where added my imports:
hiddenimports=['ftfy','sqlalchemy','mysql','pymysql','xlrd','xlwt','xlutils']
All of these packages were installed with pip
.
Some interesting issues while Pyinstaller builds one-folder:
62573 INFO: Found 4 sqlalchemy hidden imports
62577 WARNING: Hidden import "pysqlite2" not found!
62580 WARNING: Hidden import "MySQLdb" not found!
67597 WARNING: Hidden import "sqlalchemy.sql.functions.func" not found!
67623 INFO: Import to be excluded not found: 'sqlalchemy.testing'
sqlalchemy
really uses other packages, in my project it's a mysql
for connecting to MySQL DB. Every lib is in the default directory C:\Python\Lib\site-packages
Why after
dist
is made I see nothing from myhiddenimport
? Seems like statement doesn't really work. When I try run .exe:FileNotFoundError: [Errno 2] No such file or directory: 'D:\\rs_al\\IdeaProjects\\ExcelToSQL\\PyXLSQL\\dist\\service\\ftfy\\char_classes.dat' [1668] Failed to execute script service
Shall I totally trust to
pyinstaller
analyzed dependencies? I use a small part ofpandas
andpyinstaller
suggests to hook anumpy
package.