0
from PyQt5.QtChart import QChart, QChartView

我收到此错误:

«ModuleNotFoundError:没有名为“PyQt5.QtChart”的模块»

根据答案,无法在 Python 3.7 中导入 PyQtChart满足了建议: python -m pip install PyQt5==5.14 PyQtChart==5.14

和:

C:\P>pip3 search PyQt5
PyQt5-sip (12.7.2)                - The sip module support for PyQt5
  INSTALLED: 12.7.2 (latest)
PyQt5 (5.14.2)                    - Python bindings for the Qt cross platform application toolkit
  INSTALLED: 5.14.0
  LATEST:    5.14.2

C:\P>pip3 search PyQtChart
PyQtChart (5.14.0)  - Python bindings for the Qt Charts library
  INSTALLED: 5.14.0 (latest)
QCharted (1.1.1)    - Plotting large data series using PyQtChart.

版本相同 5.14.0 (PyQt5) 和 5.14.0 (PyQtChart),但有 «ModuleNotFoundError: No module named 'PyQt5.QtChart'» 的错误

所以,我想知道问题是什么?

4

1 回答 1

0

如果我是你我的朋友,我会尝试找到一个扩展名为 .whl 的单独文件并通过 CMD 安装它......它可以解决你的问题。只需在谷歌上搜索 pyqt.whl 轮子文件扩展名,然后学习如何在 CMD 中安装它。

于 2020-04-14T17:27:18.817 回答