Could not load the Qt platform plugin "xcb" - qt

I was running a code from yolact which requires cv2 qt. I encounter the following error.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in
"/home/zhengjie/anaconda3/envs/yolact-env/lib/python3.7/site-packages/cv2/qt/plugins"
even though it was found. This application failed to start because no
Qt platform plugin could be initialized. Reinstalling the application
may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal,
minimalegl, offscreen, vnc, wayland-egl, wayland,
wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
Within the directory of
/home/zhengjie/anaconda3/envs/yolact-env/lib/python3.7/site-packages/cv2/qt/plugins
I find the file: libqxcb.so I have tried re-installing qt but it does not work. Any help would be appreciated.

I also had the same problem.My opencv-python version is 4.5.3.56,in Linux.Then i reinstall opencv-python.
pip intsall opencv-python==4.3.0.36

Related

Install Qt5.12 on travis-ci linux

I'm seeing following error while trying to Install Qt5.12 on travis-ci linux. Someone please help
$ ./qt-opensource-linux-x64-5.12.10.run
QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, xcb.

qtwebengine qmake error: unkown module: webchannel

I am trying to get qt webengine running on my laptop for the first time, but can't seem to build it. I am following the instructions from here:
https://wiki.qt.io/QtWebEngineHowToTry
On the last few steps, I had to run "qmake -r" on the qtwebengine directory. This is the output:
SSL............................... Using system NSS
ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG += use_system_icu)
FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG += use_system_ffmpeg)
Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG += use_proprietary_codecs)
Reading /home/kevin/workspace/qtwebengine/src/src.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core_gyp_generator.pro
Project ERROR: Unknown module(s) in QT: webchannel
This error happened right after I installed WebKitGtk+ from here (http://trac.webkit.org/wiki/BuildingGtk) and ran "Tools/gtk/install-dependencies" and "Tools/Scripts/update-webkitgtk-libs". Before I installed WebKitGtk+, qmake would terminate at a later point.
(I installed WebKitGtk+ because, previously, running "qmake -r" on the qtwebengine directly resulted in an "unmet dependency: harfbuzz" error that I tried to fix on my own via google, and the WebKitGtk+ page was the only lead I could find that would supposedly fix that issue... big mistake!).
I am running on a (mostly freshly reformatted) Ubuntu 15.04 laptop. I installed qt5 via apt-get install, but apparently I have both qt4 and qt5 plugins installed, as well as qtchooser (I'm guessing from the WebKitGtk+ installation scripts).
Here is the output of "qmake --version":
QMake version 3.0
Using Qt version 5.4.1 in /usr/lib/x86_64-linux-gnu
Any help would be greatly appreciated, as I'm excited to try out qt webengine!
In case anyone else has the same problem, I fixed it by installing qt 5.5.0 from here http://download.qt.io/official_releases/qt/, and using the associated qmake binary from that installation. I guess installing qt from 'sudo apt-get install' still has some issues that won't work with qtwebengine.

PyQT5 error: could not find or load Qt platform plugin xcb

Up until Anaconda3 (which contains Python 3.4) was re-installed on my RedHat 6.5 workstation, I have been able to develop Python apps that use PyQT5.
Post re-install of Anaconda I receive an error message:
....could not find or load Qt platform plugin xcb
The only difference between Anaconda installs is the folder name: /usr/local/ananaconda3 vs /usr/local/anaconda_py3
I checked libqxcb.so has no missing dependencies.
I rebuilt PyQT5.
I tried explicitly adding location of site-packages of PyQT5:
import site
site.addsitedir("...path.../python3.4")
Any other suggestions?
How does re-installing Python impact the use of PyQT5?
This is an error caused by having two different versions of Qt under the same installation/environment.
Check the packages installed and their versions in your environment (if for some reason you're not working in a virtual environment, you can skip the first line):
source activate yourenvname
conda list
If you see pyqt and qt both with version 4.X.X then remove them (assuming you want to work in Qt v5):
conda remove qt
conda remove pyqt
I had an issue that seems to match what happened here.
But in my case the solution was to "sudo rm -rf user/anaconda3" and reinstall it with "bash anaconda....sh", because I had previously installed it using sudo ("sudo bash anaconda....sh")

Qt Creator needs a compiler set up to build. Configure a compiler in kit options

I just installed Qt 5.2 package on ubuntu. I simply created a Qt widget application, and when I tried to build it, I got the following message:
Qt Creator needs a compiler set up to build. Configure a compiler in
kit options
I have tried several things, all of which were unsuccessful. I tried setting the compiler kit to
Desktop Qt 5.2.0 GCC 32bit (default)
However it didn't work
After that I set the compiler to
GCC (x86 32bit in use/bin)
However that didn't work either.
I also tried adding gcc manually and gave it the path
/usr/bin/g++-4.6
but it still didn't work.
This is what appears in there Qt Version tab
This is what I get when I remove the .pro.user file and restart the IDE, Whats the difference between configuring a project as Desktop and Desktop Qt 5.2.0 GCC 32bit?
Qt Creator needs a version of tools that are able to link against the Qt binaries that the downloaded package contains. In your case, the local toolchain and the binaries don't match. That means that you would actually have to build the Qt with your toolkit and make sure that QtCreator can find the built binaries.
The simpler way for Ubuntu is to use the packaged version of the tools; they play well with the already delivered binaries. Use sudo apt-get install qtcreator to install it with all the dependencies.

Installing Qt 5.1.1 and qwt 6.1.0 on Ubuntu 12.04

I've recently came to linux from a 1 year Windows run in Qt so I don't know how this works exactly and couldn't find any thing decent. So here it is :
As is obvious from the title I'm trying to install Qt 5.1.1 and Qwt 6.1.0 in Ubuntu 12.04. I have written a project with the same versions in Windows and now I want to run the project in Linux. The problem is I don't know If I'm doing the installing process right!
I installed Qt 5.1.1 in /opt/qt5.1.1 and compiled Qwt 6.1.0 to /usr/local. I copied the files in include, lib, plugin/designer to the related folders in qt 5.1.1. After this the plugin is fine and I can see the .h files when I type include but when I want to run my project I get the error undefined reference to ... for every method or attribute of Qwt library used!
What am I doing wrong here?

Resources