Mar-02-2019, 08:46 PM
Thanks for your answers.
Please do not confuse PySide2 with Qt5.
I found one solution: i explored the packed DLLs (debug&release) and recognized it was Qt5.12 although I installed PySide2 with Qt 5.12.1.
I researched a bit and found out that the DLLs came from a previously installed Qt-SDK(5.12) installed by me. Why that?:
Solution:
PySide2 doesnt include qmake.exe on its own (or i didnt found it) So a quick and dirty fix was to insert a hardcoded path into hook-PySide2.QtQuick.py which points to <pythoninstalldir>\Python37\Lib\site-packages\PySide2\qml
Result:
The resulting executable packed with PyInstaller is around 33MB. :)
Please do not confuse PySide2 with Qt5.
I found one solution: i explored the packed DLLs (debug&release) and recognized it was Qt5.12 although I installed PySide2 with Qt 5.12.1.
I researched a bit and found out that the DLLs came from a previously installed Qt-SDK(5.12) installed by me. Why that?:
- PyInstaller uses a hook to resolve the QML dependencies hook-PySide2.QtQuick.py
- this hook uses the PATH variable "QT5DIR" to find qmake.exe
- qmake.exe is called with PATH variable "QT_INSTALL_QML" as argument
- the call result points to the QML directory
Solution:
PySide2 doesnt include qmake.exe on its own (or i didnt found it) So a quick and dirty fix was to insert a hardcoded path into hook-PySide2.QtQuick.py which points to <pythoninstalldir>\Python37\Lib\site-packages\PySide2\qml
Result:
The resulting executable packed with PyInstaller is around 33MB. :)