My setting: Python 2.7 with anaconda
Recently I have installed OpenCV 3.0 and when I try to do simple image display or I want to run python samples that come with OpenCV, there is a error message:
This application failed to start because it could not find or load the Qt platform plugin "xcb".
I have read many comments that I need to attach .so files to my project but I don't think it's the optimal solution since for most people it works out of a box.
I have no clue what to do. I'm inexperienced. What comes to my mind is only to reinstall everything.
This works for me!
Okey, I have figured it out.
During cmake I set flag
-D WITH_QT=OFF
since I read somewhere that it doesnt work for Qt5.xQt5 works fine with OpenCV 3.1.0. This is what worked for me for resolving the "xcb" error.
Apparently the Anaconda
qt
andpyqt
packages (v4) were shadowing the system v5 version.If you want to work with Qt5 try removing these via:
(Ubuntu 16.04, OpenCV 3.1.0, Anaconda 4.1.1, Qt 5)