解决pyinstall ImportError: DLL load failed while importing QtWidgets
·
使用 PyInstaller 打包 PySide6 或 PyQt 时出现 DLL 加载失败的常见解决方案:
当遇到 “ImportError: DLL load failed while importing QtWidgets” 错误时,可以尝试以下方法:
- 版本兼容性方案
降级 PySide6 至稳定版本(实测 6.7.2 版本可正常打包)
该问题通常出现在较新的 PySide6 版本与 PyInstaller 的兼容性问题上,选择经过验证的稳定版本可以有效解决。pyside6 使用pyinstall 等打包出现pyinstall ImportError: DLL load failed while importing QtWidgets,包括 pyqt
尝试降级pyside6 我测试 pyside6 6.7.2 没问题了
更多推荐
所有评论(0)