打开或创建一个用于操作的虚拟环境
conda activate name
安装依赖包
pip install PyQt5
pip install pyqt5-tools
pip install lxml



安装labelimg
pip install labelimg

打开labelimg
labelImg
出现报错:
(tf27) llm@sa:~$ 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
已放弃 (核心已转储)
参考https://cloud.tencent.com/developer/article/1726400的解决方法,直接安装libxcb-xinerama0,再次打开labelImg.
sudo apt-get install libxcb-xinerama0

问题解决。