首页 > 解决方案 > 安装 LabelImg 窗口

问题描述

我尝试按照网站上的步骤安装 LabelImg ( https://github.com/tzutalin/labelImg )。我已经安装了 PyQt4 和 lxml。但是当我运行这个命令时:

pyrcc4 -o resources.py resources.qrc

我收到此错误:

C:\Users\Christian\Desktop\labelImg-1.7.0>pyrcc4 -o resources.py resources.qrc 'pyrcc4' 不是内部或外部命令、可运行程序或批处理文件。

尝试使用 pip 我收到此错误:

C:\Users\Christian>pip install labelImg 收集 labelImg 使用缓存的https://files.pythonhosted.org/packages/c1/5d/4b8a6dc5e352543199bc3991785af2e1cd58e50f1016e3725db826e3f4bb/labelImg-1.7.0.tar.gz 命令 python setup.py egg_info 的完整输出:Traceback(最近一次调用最后一次):文件“”,第 1 行,在文件“C:\Users\CHRIST~1\AppData\Local\Temp\pip-install-ifgpd1gr\labelImg \setup.py”,第 8 行,在 readme = readme_file.read() 文件“c:\users\christian\appdata\local\programs\python\python36\lib\encodings\cp1252.py”,第 23 行,在 decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 7235: character maps to --------------- ------------------------- 命令“python setup.py egg_info”在 C:\Users\CHRIST~1\AppData\ 中失败,错误代码为 1本地\Temp\pip-install-ifgpd1gr\labelImg\

我想在没有预构建二进制文件的情况下安装它,因为我想修改 labelImg 以便它保留以前图片的注释,如下所示:https ://github.com/tzutalin/labelImg/issues/118

谢谢你的任何提示!

编辑:(将 pyrcc4 添加到我的 PATH 变量后)

C:\Users\Christian\Desktop\labelImg-1.7.0>pyrcc4 -o resources.py resources.qrc
C:\Users\Christian\Desktop\labelImg-1.7.0>python labelImg.py

现在我得到这个错误:

Traceback(最近一次调用最后):文件“labelImg.py”,第 29 行,在导入资源文件“C:\Users\Christian\Desktop\labelImg-1.7.0\resources.py”,第 9 行,来自 PyQt4 导入QtCore ValueError:PyCapsule_GetPointer 以不正确的名称调用

标签: pythonimageimage-processingcomputer-vision

解决方案


通过
https://www.python.org/downloads/release/python-357/
安装 Python3 使用以下命令通过 PIP 安装 PyQt5 和 lxml
pip3 install pyqt5 lxml

**Download, unzip and run the LabelImg.exe file via**

https://www.dropbox.com/s/kqoxr10l3rkstqd/windows_v1.8.0.zip?dl=1


推荐阅读