PySide2 with QtQuick & pyInstaller --> big executeable - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: PySide2 with QtQuick & pyInstaller --> big executeable (/thread-16083.html) |
PySide2 with QtQuick & pyInstaller --> big executeable - mame - Feb-13-2019 Hi, i experimented a little bit with PySide2 in combinatin with QtQuick & pyInstaller. I just build a small demo application which loads a QML file and displays the UI. So far it works well, with one exception: the resulting EXE is really huge. About 700MB I did searched a bit to extract the packed DLLs and recognized that pyinstallers builds the executable with Debug&Release Qt DLLs. Can someone point me to a direction where a can choose only to pack the Release Qt DLLs? RE: PySide2 with QtQuick & pyInstaller --> big executeable - Axel_Erfurt - Feb-13-2019 This is normal if you use Qt5 and pyinstaller. To prevent compatibility issues, the entire Qt5 is copied to the app. RE: PySide2 with QtQuick & pyInstaller --> big executeable - Alfalfa - Feb-15-2019 Among the goal of PySide2, they aim to ease the deployment. Hopefully this will get better in the next year or so. Meanwhile, the best way to package PyQt projects seems to be PyPi. RE: PySide2 with QtQuick & pyInstaller --> big executeable - mame - Mar-02-2019 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. :) |