Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This application failed to start because no Qt platform plugin could be initialized #1220

Open
haithienld opened this issue Nov 29, 2022 · 8 comments
Labels
bug issue

Comments

@haithienld
Copy link

Provide environment information

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/pidl/.local/lib/python3.9/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.

What OS are you using?

Ubuntu 20.04

Describe the Bug

When I run labelme Folder. The bug happens

Expected Behavior

No response

To Reproduce

No response

@haithienld haithienld added the bug issue label Nov 29, 2022
@haithienld
Copy link
Author

I fixed it.
After deleting all in the /home/pidl/.local/lib/python3.9/site-packages/cv2/qt/plugins folder that the bug still happens.
Please install. (with opencv-4.4)
sudo apt-get install qt5-default

@amaizr
Copy link

amaizr commented Jan 3, 2023

was able to work around this using this answer: NVlabs/instant-ngp#300 (comment)

@wkentaro wkentaro pinned this issue Feb 7, 2023
@kaiesalmahmud
Copy link

kaiesalmahmud commented Mar 13, 2023

I was facing the same issue. Turns out in my case, python 3.9 was causing this conflict.
I managed to solve this by creating a new environment with python 3.8.

commands:
conda create -n myenv python=3.8.0
conda activate myenv
pip3 install opencv-python==4.2.0.34

@a-pipi
Copy link

a-pipi commented Mar 13, 2023

For me it worked to downgrade PyQt5 to version 5.13.2.

I am on Python version 3.10.6 and opencv-python version 4.7.0.72.

@bryanbocao
Copy link

pip install --upgrade pyqt5_tools

solved my issue.
Reference
https://github.com/fmjohnson97/habitat_heuristic/issues/2#issuecomment-1751440118

@kimkimyoung
Copy link

kimkimyoung commented Dec 21, 2023

pip install opencv-python-headless

It works for me in a conda env

@sc0v0ne
Copy link

sc0v0ne commented Dec 21, 2023

Use brew, which avoids these errors. On Ubuntu brew works.

brew install pyqt 
brew install wkentaro/labelme/labelme  # command line interface

@Jie-Huangi
Copy link

pip install opencv-python-headless

It works for me in a conda env
also sloved my issue, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue
Projects
None yet
Development

No branches or pull requests

8 participants