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'» 的错误
所以,我想知道问题是什么?