Currently I am developping a standalone python app and I am now working on the packaging with PyInstaller.
Configuration :
- OS : Windows 10
- QGIS : 3.4.9
- PyInstaller : 3.5
Pyinstaller correctly finds many dependencies and manages to create an executable.
But when I run it, the output is :
File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "qgis\gui\__init__.py", line 27, in <module>
RuntimeError: qgis._gui cannot import type '����' from PyQt5.QtCore
[6752] Failed to execute script main
I found that the sip folder in QGIS 3.4\apps\Python37\ contains many files that might be useful, so I manually added the content of sip\PyQt5 in the PyInstaller package with other PyQt5 stuff and the new output is :
File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "qgis\gui\__init__.py", line 27, in <module>
RuntimeError: the PyQt5.Qsci module failed to register with the sip module
[4092] Failed to execute script main
Any idea about a file or folder I forgot to package ? For PyInstaller I use a default .spec file.
Reviewing Working Windows Standalone .EXE From QGIS Python Script Using PyInstaller? with QGIS 2 didn't help