2012-06-01 41 views
0

我試圖在單個文件中打包pyside + QML應用程序。 當我運行可執行文件我得到這個錯誤使用PyInstaller打包PySide

ImportError: could not import module 'PySide.QtNetwork'
Fatal Python error: can't initialize module QtDeclarative

某人是否有線索?

PS:我在Windows

+0

[** ** cx_freeze(http://cx-freeze.sourceforge.net/)從來沒有讓我我得到這個錯誤下。試試看。 –

回答

3

儘量明確地導入模塊:

進口PySide.QtNetwork

0

只想說,這解決了我的包裝與pyImporter一個pySide應用程序的問題。直到我加入這一行

Traceback (most recent call last): File "", line 93, in File "c:\Users\Rizzo the Rat\Desktop\PyInstaller-2.1\PyInstaller\loader\pyi_importers.py", line 409, in load_module module = imp.load_module(fullname, fp, filename, self._c_ext_tuple) ImportError: could not import module 'PySide.QtXml'

from PySide import QtXml 
+0

謝謝,這有幫助。 – BaldDude