【问题标题】:Problem with installing PyQtChart (Python 3.7, PyQt5)安装 PyQtChart(Python 3.7、PyQt5)时出现问题
【发布时间】:2020-07-27 12:06:45
【问题描述】:
from PyQt5.QtChart import QChart, QChartView

我收到此错误:

«ModuleNotFoundError: No module named 'PyQt5.QtChart'»

根据答案,Cannot import PyQtChart in Python 3.7 完成了建议: 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'»的错误

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

【问题讨论】:

  • 如何执行你的脚本?
  • *.py - PyCharm。在 cmd.exe 中安装。
  • 你确定pycharm使用的是你安装pyqtchart的python吗?
  • 是的,因为其他程序 *.py 和模块也可以工作(例如 reguests、Matplotlib、PyQt5 等)。仅在安装 PyQtChart 时出现问题。
  • 嗯,这不是一个可靠的答案,我建议你检查jetbrains.com/help/pycharm/…

标签: python python-3.x pyqt5 pyqtchart


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-04-26
    • 1970-01-01
    • 2018-08-22
    • 1970-01-01
    • 2019-02-03
    • 2022-01-15
    • 2020-03-11
    相关资源
    最近更新 更多