我正在尝试在单个文件中打包pyside + QML应用程序。 当我运行可执行文件时,我收到此错误
ImportError:无法导入模块'PySide.QtNetwork' 致命的Python错误:无法初始化模块QtDeclarative
有人有线索吗?
PS:我在Windows上
答案 0 :(得分:3)
尝试导入模块明确:
导入PySide.QtNetwork
答案 1 :(得分:0)
只是想说这解决了我用pyImporter打包pySide应用程序的问题。我收到了这个错误:
回溯(最近一次呼叫最后一次):文件"",第93行,in 文件" c:\ Users \ Rizzo the Rat \ Desktop \ PyInstaller-2.1 \ PyInstaller \ loader \ pyi_importers.py",line 409,在load_module中 module = imp.load_module(fullname,fp,filename,self._c_ext_tuple)ImportError:无法导入模块' PySide.QtXml'
直到我添加这一行:
from PySide import QtXml