Pyqtgraph librarry loading problem

1,320 views
Skip to first unread message

Vlado Kršlin

unread,
Aug 14, 2021, 5:01:54 AM8/14/21
to pyqtgraph

Hello, recently fresh release of Raspbian OS with QT4 and pyqtgraph librarry was installed and project which run before, don't run anymore.
Here is error text which I got running my project and graph script is attached.
With best regards, Vlado

Error text:
Traceback (most recent call last):
  File "/home/pi/Desktop/Sušilec sadja/Project/main.py", line 29, in <module>
    from graph_2 import *
  File "/home/pi/Desktop/Sušilec sadja/Project/graph_2.py", line 3, in <module>
    import pyqtgraph as pg
  File "/usr/local/lib/python3.7/dist-packages/pyqtgraph/__init__.py", line 13, in <module>
    from .Qt import QtCore, QtGui, mkQApp
  File "/usr/local/lib/python3.7/dist-packages/pyqtgraph/Qt/__init__.py", line 49, in <module>
    raise Exception("PyQtGraph requires one of PyQt5, PyQt6, PySide2 or PySide6; none of these packages could be imported.")
Exception: PyQtGraph requires one of PyQt5, PyQt6, PySide2 or PySide6; none of these packages could be imported.

graph_2.py

Ognyan Moore

unread,
Aug 14, 2021, 12:58:29 PM8/14/21
to pyqt...@googlegroups.com
Hi Vlado,

As the error text suggests, you need one of the libraries PyQt5, PyQt6, PySide2 or PySide6 available.  PyQtGraph no longer works w/ Qt4.  I believe the last version to support Qt4 was 0.11.1.  Generally speaking, we recommend using the latest version of Qt bindings available.

There is an issue with how PyQt5 bindings were packaged for Ubuntu 20.04 via apt, see https://github.com/pyqtgraph/pyqtgraph/issues/1882    We have implemented a work-around for that issue, but it won't be bundled until the next released version, so if you do install PyQt5 bindings via apt on Ubuntu, you'll want to run pyqtgraph from the master branch.

Ogi

--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/7de2bb12-21d9-4abc-b2c2-ffcf6bc09f3dn%40googlegroups.com.

Vlado Kršlin

unread,
Aug 15, 2021, 2:00:18 AM8/15/21
to pyqtgraph
Thanks for respond, is it possible to get an old version of the librarry, which stil works with QT4, and manually install it or something like this. My project is quite big and mooving to higher version of QT require a lot of unwanted work?

Vlado

sobota, 14. avgust 2021 ob 18:58:29 UTC+2 je oseba ognyan...@gmail.com napisala:

Martin Chase

unread,
Aug 18, 2021, 2:24:16 PM8/18/21
to pyqt...@googlegroups.com
Installing specific versions from PyPi:

    pip install pyqtgraph==0.11.1
Reply all
Reply to author
Forward
0 new messages