Qt5, PyQt5 and opencv: problem with import
i have installed before Qt5 so i have the .so libraries in the
and i have also installed PyQt5 in a virtual environment (using)
pip3 install pyqt5
but when i try to import cv2 and pyQt5 in the same program i got some errors.
this virtual env contains a link to my opencv library for python 3.5
without import cv2, i can launch my code
but if i add import cv2 i got :
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.10' not found (required by /home/jimmy/.virtualenvs/keras_tf_qt/lib/python3.5/site-packages/PyQt5/QtCore.so)
Just an educated guess: you are using an OpenCV version built with your system's Qt while your PyQt5 installation comes with it's own Qt dependencies and they are clashing because you are trying to load two different versions of Qt with the same namespace in the same memory space.
opencv-pythonthrough pip or use your distribution provided PyQt5.
use your distribution provided PyQt5.
Can you detail this please?
I have installed opencv for python3 like this way
What exact linux distribution are you using ?
How did you install Qt ?
@SGaist i am using ubuntu 16.04 LTS and i have installed Qt like this:
For your version of Ubuntu the suggested guide is this one.
@SGaist Thank you for the link
i have installed opencv this way so i have also linked my opencv to my python3 virtual environment.
i could finally solved my problem by following this link, i guess it is not the optimal method but it worked...