[PyQt] Package Error with Pyinstaller
Hans-Peter Jansen
hpj at urpla.net
Fri Jan 10 12:22:21 GMT 2014
On Freitag, 10. Januar 2014 18:06:11 levinie wrote:
> Following is my env:
> python2.7.6
> PyQt5.1
> Qt5.10
> Windows7
>
> Slice of my code:
> if __name__ == "__main__":
> try:
> app = QApplication(sys.argv)
> view = QQuickView()
> # the follow setIcon take no effect...
> view.setIcon(QIcon("qrc:///zbkc/appicon.png"))
> view.setTitle("SomeToolv0.2")
> view.setMaximumSize(QSize(1144,750))
> view.setMinimumSize(QSize(1144,750))
> view.engine().quit.connect(app.quit)
> view.setSource(QUrl("qrc:///zbkc/zbkcFileTest.qml"))
> view.show()
> ro = view.rootObject()
> ro.clicked.connect(process)
> app.exec_()
> except Exception, e:
> logger.info(e)
>
> It's OK on My Computer.
> But When i package it with Pyinstaller on Win7,
> Run on others' Computer(not Qt & PyQt installed)
> Here is the error:
> module "QtQuick" is not installed
> module "QtQuick.Controls" is not installed
> module "QtQuick.Window" is not installed
You need to teach pyinstaller to add QtQuick module, as it has no chance to
detect that dependency itself.
Pete
More information about the PyQt
mailing list