Solved How use PySide2.QtCharts
-
Hi!
I use Ubuntu 20.
Please tell me how to configure PySide2 to work with PySide 2.QtCharts?
I tried to install PySide2 in PyCharm, but got An error:File "/home/admin1/PytonProjects/ForQtMIFI/widgets/systemLoad2.py", line 10, in <module> from PySide2 import QtCharts ImportError: /lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.14' not found (required by /home/admin1/.local/lib/python3.8/site-packages/PySide2/libpyside2.abi3.so.5.14)
At the same time, you should use Qt of the required version. I tried to add the path in the interpreter, but it didn't help:
/home/admin1/Qt/5.14.2/gcc_64/lib
-
@Mikeeeeee How did you install PySide2?
-
I install PySide2 from PyCharm
-
Hi,
Where exactly was it installed ?
-
try add:
import PySide2 import os.path pyside2_dir = os.path.dirname(PySide2.__file__) os.environ["PATH"] += os.pathsep + pyside2_dir
before
from PySide2 import XXX
-
@SGaist I instal PySide2 v 5.14.2
-
@eyllanesc maybe it doesn't work because I use PyQt5 and PySide 2?
-
@Mikeeeeee said in How use PySide2.QtCharts:
I use PyQt5 and PySide 2
Do you mean at the same time in same application?
-
@jsulm Yes. I need QGIS. It only works with the stable version of PyQt. But the stable version of PyQt doesn't have PyQtCharts. I'm trying to connect PyQtCharts somehow.
-
@Mikeeeeee
Are you really saying you are trying to use both PyQt5 and PySide2 in the same application? But you didn't mention this in your question? Just because you need some packages which are available only in one of the two doesn't mean you can just choose to mix them because you want to. -
@Mikeeeeee you should not use both libraries, what I suspect is that PyQt5 has been compiled with a different version of Qt than PySide2 was compiled causing the conflict.