0
from PyQt5.QtChart import QChart, QChartView

I get this error:

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

According to the answer, Cannot import PyQtChart in Python 3.7 fulfilled recommendations: python -m pip install PyQt5==5.14 PyQtChart==5.14

and:

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.

The versions are the same 5.14.0 (PyQt5) and 5.14.0 (PyQtChart), but there is the error of «ModuleNotFoundError: No module named 'PyQt5.QtChart'»

So, I was wondering what the problem is?

Ata
  • 33
  • 1
  • 11
paradoxarium
  • 177
  • 1
  • 12
  • How do you execute your script? – eyllanesc Apr 14 '20 at 17:08
  • *.py - PyCharm. Install in cmd.exe. – paradoxarium Apr 14 '20 at 18:10
  • Are you sure pycharm is using the python where you installed pyqtchart? – eyllanesc Apr 14 '20 at 18:10
  • Yes, because other programs *.py and modules work (for example reguests, Matplotlib, PyQt5 etc). Problem only in install PyQtChart. – paradoxarium Apr 14 '20 at 18:15
  • mmm, that's not a solid answer, I recommend you check https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add-existing-interpreter – eyllanesc Apr 14 '20 at 18:19
  • According to your recommendation: I had two project interpreters Python 3.7 (MyProject) and Python 3.7 (venv) (interpreters are the same, but different PATH of interpreters). Changing the interpreter (on Python 3.7 (venv)) helped SOLVE the problem - the module PyQtChart is connected! You write the correct answer and I will mark as the correct answer? Or should I add your solution to the question update? – paradoxarium Apr 14 '20 at 18:48

1 Answers1

0

If I were you my friend, I would try to find a separate file with an extension of .whl and install it via CMD... It could handle your problem. Just google for a pyqt.whl wheel file extension and then learn how to install it within CMD.

Ata
  • 33
  • 1
  • 11