labelme安装/错误记录(自用)

安装教程1:Labelme 安装以及使用_期待686的博客-CSDN博客_labelme,运行后报错:

qt.qpa.plugin: Could not load the Qt platform plugin "windows" 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: direct2d, minimal, offscreen, windows.

调了半天没调好,加了dll文件和环境变量也没用,直接卸载重装,卸载指令:

conda remove -n labelme --all
pip uninstall labelme

重装,安装教程2:Labelme使用——数据集标注详解-pudn.com,运行后报错:

(labelme) C:\Users\Administrator>labelme
Traceback (most recent call last):
  File "E:\Anaconda3\envs\labelme\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "E:\Anaconda3\envs\labelme\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "E:\Anaconda3\envs\labelme\Scripts\labelme.exe\__main__.py", line 4, in 
  File "E:\Anaconda3\envs\labelme\lib\site-packages\labelme\__init__.py", line 17, in 
    QT4 = QT_VERSION[0] == "4"
TypeError: 'NoneType' object is not subscriptable

卸载pyqt5和pyqt5-tools(可能是因为pyqt5-tools版本不对,不确定,反正我都卸了)

pip uninstall pyqt5
pip uninstall pyqt5-tools

然后删掉E:\Anaconda3\Lib\site-packages路径下的三个pyqt5相关文件,忘记截图了,好像是一个个Pyqt5和两个pyqt5命名带dist的文件,然后重装Pyqt5和Pyqt5-tools,指令:

pip3 install PyQt5
pip install pyqt5-tools -i https://pypi.tuna.tsinghua.edu.cn/simple/

再运行labelme就可以成功

labelme安装/错误记录(自用)_第1张图片

labelme安装/错误记录(自用)_第2张图片

 

你可能感兴趣的:(windows)