wkentaro / labelme

Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation).
https://labelme.io
Other
13.26k stars 3.38k forks source link

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

Open haithienld opened 1 year ago

haithienld commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

was able to work around this using this answer: https://github.com/NVlabs/instant-ngp/discussions/300#discussioncomment-3179213

kaiesalmahmud commented 1 year ago

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 commented 1 year ago

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 commented 12 months ago
pip install --upgrade pyqt5_tools

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

kimkimyoung commented 9 months ago

pip install opencv-python-headless

It works for me in a conda env

sc0v0ne commented 9 months ago

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

brew install pyqt 
brew install wkentaro/labelme/labelme  # command line interface
Jie-Huangi commented 9 months ago

pip install opencv-python-headless

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

Satyam-Vy commented 3 months ago

pip install opencv-python-headless

It works for me in a conda env

worked for me to solve anaconda-navigator launch issue! thanks!!

mzohaibnasir commented 2 months ago

pip install opencv-python-headless It works for me in a conda env

worked for me to solve anaconda-navigator launch issue! thanks!!

that didn't work but upgrading openv did the job for me pip install opencv-python --upgrade

Troye5585 commented 1 week ago

New system ubuntu 20.04, first time installing labelImg with a bug: (labelimg) user@sf-purechip-gpu:~$ labelImg 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: linuxfb, minimal, offscreen, vnc, webgl, xcb.

已放弃 (核心已转储) Solution Methods 1:export QT_DEBUG_PLUGINS=1 2:get the response: Cannot load library /home/user/anaconda3/envs/labelimg/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: 无法打开共享对象文件: 没有那个文件或目录) 3: run in dir /home/user/anaconda3/envs/labelimg/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/ "ldd libqxcb.so" to get "libxcb-xinerama.so.0 => not found" 4: sudo apt-get install libxcb-xinerama0 5: labelImg 6: OK refer to: https://cloud.tencent.com/developer/article/1726400