I recently downloaded PyQtGraph and am using Python 2.7. I am attempting to run the simple example from the documentation:
import pyqtgraph.examples
pyqtgraph.examples.run()
However, when I attempt to import the package in iPython or in a script, I am greeted with the following error:
Exception: PyQtGraph requires one of PyQt4, PyQt5 or PySide; none of these packages could be imported.
I've installed PyQt5 via Homebrew (as it wasn't able to do so with PySide or PyQt4) but I still get the same error. When I attempt to import any of these packages I get a similar error telling me that they can't be imported. Here is my traceback when I attempt to import PyQtGraph:
In [1]: import pyqtgraph as pg
-----------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-1-e5a51b506085> in <module>()
----> 1 import pyqtgraph as pg
/usr/local/lib/python2.7/site-packages/pyqtgraph/__init__.py in <module>()
11 ## 'Qt' is a local module; it is intended mainly to cover up the differences
12 ## between PyQt4 and PySide.
---> 13 from .Qt import QtGui
14
15 ## not really safe--If we accidentally create another QApplication, the process hangs (and it is very difficult to trace the cause)
/usr/local/lib/python2.7/site-packages/pyqtgraph/Qt.py in <module>()
42
43 if QT_LIB is None:
---> 44 raise Exception("PyQtGraph requires one of PyQt4, PyQt5 or PySide; none of these packages could be imported.")
45
46 if QT_LIB == PYSIDE:
Exception: PyQtGraph requires one of PyQt4, PyQt5 or PySide; none of these packages could be imported.
And when I try to import any of the PySide, PyQt4, or PyQt5 packages:
In [7]: import PyQt4
-----------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-0c3b8c686717> in <module>()
----> 1 import PyQt4
ImportError: No module named PyQt4