Not able to use PyQtGraph after installation

35 views
Skip to first unread message

andrea gotelli

unread,
May 27, 2020, 11:52:56 AM5/27/20
to pyqtgraph
Dear all,

I have to following problem: after having installed the package (from GitHub) I have the possibility of choosing PyQtGraph in rqt_plot, but if i select it nothing changes, and when I check again in the setting, the MatPlot is always selected. I use Ubuntu 18.04 with ros Melodic.

I don't know if it is an useful piece of information, but if i run: python -m pyqtgraph.examples (as suggested in the PYQtGraph page) the result is the following.

agotelli@ProBook:~$ python -m pyqtgraph.examples
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/examples/__main__.py", line 159, in <module>
    run()
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/examples/__main__.py", line 154, in run
    app = App([])
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/examples/__main__.py", line 28, in __init__
    super().__init__(*args, **kwargs)
TypeError: super() takes at least 1 argument (0 given)



Thank you all for the help in advance.

Rubén Alfredo Tupayachi Latorre

unread,
May 27, 2020, 1:03:33 PM5/27/20
to pyqtgraph
You can try: python3 -m pyqtgraph.examples

andrea gotelli

unread,
May 27, 2020, 1:07:37 PM5/27/20
to pyqtgraph
Hi,

Thanks now the output as changed. I report it below.

agotelli@ProBook:~$ python3 -m pyqtgraph.examples
/usr/bin/python3: Error while finding module specification for 'pyqtgraph.examples' (ModuleNotFoundError: No module named 'pyqtgraph')

andrea gotelli

unread,
May 27, 2020, 2:45:20 PM5/27/20
to pyqtgraph
The problem of the example not running was solved by:
1) Installing the package (even after the git clone and the python installation, maybe there was something wrong):
sudo pip install pyqtgraph

2) Then installing PyQt5:
sudo pip install pyqt5

3) Now the command:
python3 -m pyqtgraph.examples
does its job.


However when I run rqt_plot from the terminal the plot opens using MatPlot.
Now I can change it and select PyQtGraph, but when I press "OK", the setting doesn't change and if I reopen the panel, using the little gear, the configuration still show the MatPlot in use.

Reply all
Reply to author
Forward
0 new messages