I am able to install PyQtChart without error using pip, but I cannot import it as Python (3.7.3) tells me there is no such module.
I'm using Anaconda's Python distribution on Windows 10, but its version of PyQt5 is really old. After seeing a question with a comment by eyllanesc I uninstalled PyQt5 from Anaconda and reinstalled (the current 5.13 version) via pip. Everything with that worked fine and my PyQt5 is the latest version and imports and works well. But PyQtChart isn't importing. I installed like this:
OK> pip install --user PyQtChart
Collecting PyQtChart
Downloading https://files.pythonhosted.org/packages/a2/4c/2bf0482300e6ae407d33fcc098c310de00a86f3ee0755ae5419298e5e5c3/PyQtChart-5.13.0-5.13.1-cp35.cp36.cp37.cp38-none-win_amd64.whl (848kB)
|████████████████████████████████| 849kB 6.4MB/s
Requirement already satisfied: PyQt5>=5.13 in d:\programdata\anaconda3\lib\site-packages (from PyQtChart) (5.13.1)
Requirement already satisfied: PyQt5_sip<13,>=4.19.19 in d:\programdata\anaconda3\lib\site-packages (from PyQt5>=5.13->PyQtChart) (4.19.19)
Installing collected packages: PyQtChart
Successfully installed PyQtChart-5.13.0
OK> pip list
Package Version
---------------------- ---------
...
PyQt5 5.13.1
PyQt5-sip 4.19.19
PyQtChart 5.13.0
and when I import I get the error:
ModuleNotFoundError: No module named 'PyQtChart'
I also looked through the dir(PyQt5) and there is no submodule or component for charts.
How can get this to import properly?
EDIT: As I mentioned, I already looked for other modules. This code is not helpful, but requested.
import PyQt5
import PyQtChart as qtch
#from PyQt5 import QtChart
d = dir(PyQt5)
for i in d:
if "chart" in i.lower():
print(i)
I TRIED multiple ways to install and import, including the suggested ways. Pip3 would not install the module.