python - 执行exe时没有模块名称 'pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5'

标签 python pyqt pyqt5 pyinstaller pyqtgraph

ModuleNotFoundError: No module named 'pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5'
[13260] Failed to execute script main

执行使用pyinstaller创建的exe时出现这个错误, 我已经尝试使用 --hidden-import 但它仍然不起作用。

最佳答案

这可能是因为

  • 您的 PyQt/pyqtgraph 库不兼容或
  • 版本 >=0.12 中的 pyqtgraph 回归

您可以在 pyqtgrph 的 GitHub 页面上查看“Qt 绑定(bind)测试矩阵”,看看您是否合规。就我而言,我使用的是 python3.8 和 PyQt5-5.15,它们已通过测试。我仍然看到你报告的错误。

将 pyqtgraph 回滚到 0.11 对我有用。

关于python - 执行exe时没有模块名称 'pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67136627/

相关文章:

python - 文件系统树到 json

python - 在 python 中已经打开的 url 上发送 POST 请求

python - PyQt 多行文本输入框

c++ - 使用 Qt,我应该使用 setStyleSheet 还是 QPalette(Background, image) 来设置背景图像?

python - pyqt5 中显示带有列的选中列表的最佳小部件是什么

python - 执行欧几里得计算时获取数组元素

python - 没有名为常量的模块

python - Qt 设计器 : Custom code for custom actions

python - 如何使用opencv将图像显示到PYQT

python - 为什么我需要用pyqtSlot装饰连接的插槽?