gpt4 book ai didi

python - WinPE中无法导入PyQt5/PySide的QtGui、QtWidgets模块

转载 作者:行者123 更新时间:2023-12-03 20:45:48 27 4
gpt4 key购买 nike

我正在开发一个在 WinPE 中使用的工具,并且在 WinPE 环境中使用 PySide2/PyQt5 时遇到了问题。
导入 QtGui 时显示 ImportError: DLL load failed while importing QtGui: The specified module could not be found.但是导入QtCore是成功的。
如果我在另一台 Windows 机器上使用相同的环境,它是成功的。

最佳答案

我还开发了一个在 winpe 中运行的 pyqt5 程序。
使用pyinstaller将其转换为exe并在新的win7机器上成功运行。
在 win10 pe 启动时,命令行显示以下消息。

The specified module could not be found.


我发现一种解决方案是从以下 url 使用特定版本的 PyQT5
pip install PyQT5==5.9
https://stackoverflow.com/a/51821319/7324168

关于python - WinPE中无法导入PyQt5/PySide的QtGui、QtWidgets模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65746847/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com