> Is there a similar way to force pg to use pyside when calling
pyqtgraph.examples from the command line?

Not as far as I know.  PyQtGraph used to offer some environment variable
support, which were deprecated; but perhaps we should consider
re-introducing them.  A number of other tools leverage the QT_API
environment variable, with various possible values, but on a quick google
search I'm not sure there is consensus on consistent values... I'll think
about it a bit more.

If anyone has the time/motivation to get this implemented, we would
certainly welcome a pull request to implement this functionality.

Ogi



On Tue, Jun 15, 2021 at 7:32 AM James <[email protected]> wrote:

> Thanks for the quick reply and suggestion.
> + Yes -- I had already installed PyQt5 via pip in my pyenv.
> + I tried your suggestion (installing pyside6) but still get an error
> about PyQt5 (details below)...
>
> Can I force pyqtgraph to use pyside instead of qt?
> I see that <https://pyqtgraph.readthedocs.io/en/latest/how_to_use.html> I
> can force pg to use pyside by importing it first:
>
> import PySide2  ## this will force pyqtgraph to use PySide2 instead of
> PyQt5
> import pyqtgraph as pg
>
> Is there a similar way to force pg to use pyside when calling
> pyqtgraph.examples from the command line?
>
> Thank you!
>
> (dwadaq) $ pip install pyside6
> Collecting pyside6
>   Downloading
> PySide6-6.1.1-6.1.1-cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl (209.8
> MB)
>      |████████████████████████████████| 209.8 MB 6.2 kB/s
> Collecting shiboken6==6.1.1
>   Downloading
> shiboken6-6.1.1-6.1.1-cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl (1.1
> MB)
>      |████████████████████████████████| 1.1 MB 18.8 MB/s
> Installing collected packages: shiboken6, pyside6
> Successfully installed pyside6-6.1.1 shiboken6-6.1.1
> (dwadaq) $ python3 -m pyqtgraph.examples
> Traceback (most recent call last):
>   File "/home/jbattat/.pyenv/versions/3.8.1/lib/python3.8/runpy.py", line
> 184, in _run_module_as_main
>     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
>   File "/home/jbattat/.pyenv/versions/3.8.1/lib/python3.8/runpy.py", line
> 110, in _get_module_details
>     __import__(pkg_name)
>   File
> "/home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/pyqtgraph/__init__.py",
> line 13, in <module>
>     from .Qt import QtGui
>   File
> "/home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/pyqtgraph/Qt.py",
> line 153, in <module>
>     from PyQt5 import QtGui, QtCore, QtWidgets, uic
> ImportError: /usr/lib64/libQt5Core.so.5: version `Qt_5.15' not found
> (required by
> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/
> QtGui.abi3.so)
> On Monday, June 14, 2021 at 6:34:10 PM UTC-4 [email protected] wrote:
>
>> Hi James,
>>
>> I assume you have PyQt5 installed in your pyenv environment via pip?  If
>> so; I would suggest trying to install PySide2 (or better yet, PySide6)
>> instead and see if that works for you instead.  I haven't attempted to run
>> PyQtGraph on CentOS, so I can't speak to any first-hand experience there,
>> sorry!
>>
>> On Mon, Jun 14, 2021 at 12:59 PM James <[email protected]> wrote:
>>
>>> I was trying to run the pyqtgraph examples on CentOS 7, and hit the
>>> following error:
>>>   ImportError: /usr/lib64/libQt5Core.so.5: version `Qt_5.15' not found
>>> (required by
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/
>>> QtGui.abi3.so)
>>>
>>> I've not been able to solve it yet, and was hoping that I might find
>>> help on this list.
>>>
>>> Thanks for your any help you can provide.
>>>
>>> Full output (for pyqtgraph.examples and ldd on the libraries) is below.
>>>
>>> $ python3 -m pyqtgraph.examples
>>> Traceback (most recent call last):
>>>   File "/home/jbattat/.pyenv/versions/3.8.1/lib/python3.8/runpy.py",
>>> line 184, in _run_module_as_main
>>>     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
>>>   File "/home/jbattat/.pyenv/versions/3.8.1/lib/python3.8/runpy.py",
>>> line 110, in _get_module_details
>>>     __import__(pkg_name)
>>>   File
>>> "/home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/pyqtgraph/__init__.py",
>>> line 13, in <module>
>>>     from .Qt import QtGui
>>>   File
>>> "/home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/pyqtgraph/Qt.py",
>>> line 153, in <module>
>>>     from PyQt5 import QtGui, QtCore, QtWidgets, uic
>>> ImportError: /usr/lib64/libQt5Core.so.5: version `Qt_5.15' not found
>>> (required by
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/
>>> QtGui.abi3.so)
>>>
>>>
>>> $ ldd /usr/lib64/libQt5Core.so.5
>>> linux-vdso.so.1 =>  (0x00007ffdcbd96000)
>>> libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007fd782d6b000)
>>> libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007fd782b39000)
>>> libz.so.1 => /usr/lib64/libz.so.1 (0x00007fd782923000)
>>> libicui18n.so.50 => /usr/lib64/libicui18n.so.50 (0x00007fd782524000)
>>> libicuuc.so.50 => /usr/lib64/libicuuc.so.50 (0x00007fd7821aa000)
>>> libicudata.so.50 => /usr/lib64/libicudata.so.50 (0x00007fd780bd6000)
>>> libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007fd78096a000)
>>> libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007fd780765000)
>>> libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0
>>> (0x00007fd780563000)
>>> libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fd78022c000)
>>> libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fd77ff23000)
>>> libm.so.6 => /usr/lib64/libm.so.6 (0x00007fd77fc21000)
>>> libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007fd77fa0b000)
>>> libc.so.6 => /usr/lib64/libc.so.6 (0x00007fd77f649000)
>>> /lib64/ld-linux-x86-64.so.2 (0x00007fd783435000)
>>> libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007fd77f444000)
>>> librt.so.1 => /usr/lib64/librt.so.1 (0x00007fd77f23c000)
>>> libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007fd77f014000)
>>> liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007fd77edee000)
>>> liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007fd77ebd9000)
>>> libgcrypt.so.11 => /usr/lib64/libgcrypt.so.11 (0x00007fd77e957000)
>>> libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007fd77e752000)
>>> libresolv.so.2 => /usr/lib64/libresolv.so.2 (0x00007fd77e538000)
>>> libdw.so.1 => /usr/lib64/libdw.so.1 (0x00007fd77e2f0000)
>>> libattr.so.1 => /usr/lib64/libattr.so.1 (0x00007fd77e0eb000)
>>> libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007fd77de89000)
>>> libelf.so.1 => /usr/lib64/libelf.so.1 (0x00007fd77dc73000)
>>> libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007fd77da63000)
>>>
>>>
>>> $ sudo ldd
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/
>>> QtGui.abi3.so
>>> [sudo] password for jbattat:
>>> ldd: warning: you do not have execution permission for
>>> `/home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/
>>> QtGui.abi3.so'
>>> linux-vdso.so.1 =>  (0x00007ffe550e1000)
>>> libQt5Gui.so.5 =>
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5Gui.so.5
>>> (0x00007f32fc7a6000)
>>> libQt5Core.so.5 =>
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
>>> (0x00007f32fbfaf000)
>>> libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f32fbc84000)
>>> libc.so.6 => /lib64/libc.so.6 (0x00007f32fb8c3000)
>>> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f32fb6a6000)
>>> libGL.so.1 => /usr/lib64/nvidia/libGL.so.1 (0x00007f32fb376000)
>>> libz.so.1 => /lib64/libz.so.1 (0x00007f32fb160000)
>>> libm.so.6 => /lib64/libm.so.6 (0x00007f32fae5d000)
>>> libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f32fac47000)
>>> libicui18n.so.56 =>
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/Qt5/lib/libicui18n.so.56
>>> (0x00007f32fa7ae000)
>>> libicuuc.so.56 =>
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/Qt5/lib/libicuuc.so.56
>>> (0x00007f32fa3f5000)
>>> libicudata.so.56 =>
>>> /home/jbattat/.pyenv/versions/dwadaq/lib/python3.8/site-packages/PyQt5/Qt5/lib/libicudata.so.56
>>> (0x00007f32f8a12000)
>>> libdl.so.2 => /lib64/libdl.so.2 (0x00007f32f880e000)
>>> libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f32f860b000)
>>> libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f32f82d4000)
>>> /lib64/ld-linux-x86-64.so.2 (0x00007f32fd43a000)
>>> libnvidia-tls.so.352.79 => /usr/lib64/nvidia/tls/libnvidia-tls.so.352.79
>>> (0x00007f32f80d0000)
>>> libnvidia-glcore.so.352.79 =>
>>> /usr/lib64/nvidia/libnvidia-glcore.so.352.79 (0x00007f32f563c000)
>>> libX11.so.6 => /lib64/libX11.so.6 (0x00007f32f52fe000)
>>> libXext.so.6 => /lib64/libXext.so.6 (0x00007f32f50eb000)
>>> libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f32f4ec3000)
>>> libXau.so.6 => /lib64/libXau.so.6 (0x00007f32f4cbe000)
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pyqtgraph/e349f5b0-94b7-40f1-92af-5c4a8edf9e6dn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pyqtgraph/e349f5b0-94b7-40f1-92af-5c4a8edf9e6dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pyqtgraph/e0266de5-4171-48fd-ae97-befc905442fan%40googlegroups.com
> <https://groups.google.com/d/msgid/pyqtgraph/e0266de5-4171-48fd-ae97-befc905442fan%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/CA%2BnduTEx0CXnVRgzYCWG8tf25STaqvde_eyOtae2VW%3DsnNDN%2Bw%40mail.gmail.com.

Reply via email to