简体   繁体   English

pySide:找不到ExtensionLoader_Pyside_QtGUI.py指定的模块

[英]pySide: ExtensionLoader_Pyside_QtGUI.py specified module could not be found

I'm using CXFreeze with PySide (QT). 我正在使用带有PySide(QT)的CXFreeze。 I get an error: cx_Freeze: Python error in main script. 我收到一个错误:cx_Freeze:主脚本中的Python错误。 myscript.py line 33, in File ExtensionLoader_Pyside_QtGUI.py, line 11, in Import Error: DLL load failed: The specified module could not be found myExtensionLoader_Pyside_QtGUI.py的myscript.py第33行,导入错误中的第11行,DLL加载失败:找不到指定的模块

When running a fresh install of Windows server 2008. I'm running the frozen EXE package (with the folder). 运行Windows Server 2008的全新安装时。我正在运行冻结的EXE程序包(带有文件夹)。 It seems to work on my own system and other systems. 它似乎可以在我自己的系统和其他系统上工作。 What might be the issue? 可能是什么问题?

After reading, online, I tried to replace the Qt4Gui file, but this didn't solve the issue. 在网上阅读后,我试图替换Q​​t4Gui文件,但这不能解决问题。

Python version is 2.7 Python版本是2.7

Based on your Import Error: DLL load failed it is most likely an installation issue causing the missing DLL. 根据您的Import Error: DLL load failed ,很可能是导致缺少DLL的安装问题。 To figure our exactly which DLL you are missing, use http://www.dependencywalker.com/ Run the .exe and open the .pyd file for File ExtensionLoader_Pyside_QtGUI.py and it will show you exactly which DLL's are missing and more importantly the locations where they should be. 要确定我们到底丢失了哪个DLL,请使用http://www.dependencywalker.com/运行.exe并打开File ExtensionLoader_Pyside_QtGUI.py文件的.pyd文件,它将确切显示出缺少的DLL,更重要的是,他们应该在的位置。 You can probably then track down the missing DLL online. 然后,您可能可以在线查找丢失的DLL。

there are known issues with pyside 1.2.0 and cxFreeze. pyside 1.2.0和cxFreeze存在已知问题。 All should be fixed in development version (available on git repo). 所有这些都应该在开发版本中修复(在git repo上可用)。 Please build the PySide from latest sources yourself or wait for PySide version 1.2.1. 请自己从最新资源构建PySide,或者等待PySide 1.2.1版。 Build instructions are here [1]. 构建说明在此处[1]。

[1] https://github.com/PySide/pyside-setup#building-pyside-on-a-windows-system [1] https://github.com/PySide/pyside-setup#building-pyside-on-a-windows-system

I used Py2exe instead of CXFreeze and it worked perfectly. 我用的是Py2exe而不是CXFreeze,它运行良好。

Also, apparently Python requires the MS Visual C++ Dependency Files: http://www.microsoft.com/en-us/download/details.aspx?id=29 So any bundling needs that as well, if it's a fresh install. 另外,显然Python需要MS Visual C ++依赖文件: http : //www.microsoft.com/zh-cn/download/details.aspx?id= 29因此,如果是全新安装,则任何捆绑软件都需要它。 (Although I think they are now bundled with newer Windows versions.) (尽管我认为它们现在已与更新的Windows版本捆绑在一起。)

Other Notes: In my experience, sometimes you should try CXFreeze, Py2EXE and PyInstaller quickly and see if one works best. 其他说明:根据我的经验,有时您应该快速尝试CXFreeze,Py2EXE和PyInstaller,看看是否效果最好。 As ideal as CXFreeze is re: cross platform, it just isn't going to happen perfectly. 就像CXFreeze理想的是re:跨平台一样,它不会完美实现。

Also, while I don't know if this was a factor, I set up a Windows 2000 Pro virtual machine and ran Py2exe on that. 另外,虽然我不知道这是否是一个因素,但我还是安装了Windows 2000 Pro虚拟机并运行了Py2exe。 That was to ensure compatibility for all older Windows versions, and seemed to work well. 那是为了确保与所有较旧的Windows版本兼容,并且似乎运作良好。 (NOTE: Many things won't even run on Win2000 anymore so be careful that your other tools and libraries will run on it.) (注意:许多事情甚至都无法在Win2000上运行,因此请小心,其他工具和库也将在其上运行。)

Finally, be extra careful to match the bit level (32 vs 64) of all your libraries, and your Python install itself. 最后,要格外小心,以匹配所有库的位级别(32 vs 64),并且Python会自行安装。 If you have 32-bit python, ensure that your PySide, CXFreeze and any other libraries you use are 32-bit. 如果您拥有32位python,请确保您的PySide,CXFreeze和您使用的任何其他库都是32位的。 (Or 64-bit if you're using 64-bit python.) (如果使用的是64位python,则为64位。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM