Running the following script as a onefile-exe throws an error:
C:\qt_browser\dist>qt_browser
Traceback (most recent call last):
File "<string>", line 7, in <module>
File "C:\pyinstaller\iu.py", line 414, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "C:\pyinstaller\iu.py", line 473, in doimport
mod = importfunc(nm)
File "C:\pyinstaller\iu.py", line 282, in getmod
mod = owner.getmod(nm)
File "C:\pyinstaller\archive.py", line 463, in getmod
return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
File "C:\pyinstaller\iu.py", line 109, in getmod
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
File "C:\pyinstaller\iu.py", line 433, in importHook
raise ImportError, "No module named %s" % fqname
ImportError: No module named PyQt4.QtNetwork
The script:
import sys
from PyQt4.QtCore import QUrl
from PyQt4.QtGui import QApplication
from PyQt4.QtWebKit import QWebView
def main():
app = QApplication(sys.argv)
browser = QWebView()
browser.load(QUrl('http://google.de'))
browser.show()
app.exec_()
if __name__ == '__main__':
main()
As a workaround I have put the import of PyQt4.QtNetwork into my
script, but I don't think this is the intention of pyinstaller. ;-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---