安装labelImg以及遇到的问题
直接下载labelImg.exe遇到的问题:双击打开只有黑色终端并闪退
环境:win10 python3.7
百度后尝试解决方法:1.路径不能含中文。试了但不行。2.删除 C:\Users\YourAccount\..labelImgSettings.pkl,重新打开labelImg。查找发现电脑内没有此文件,还是不行。
最后找到的有效方法:
- 安装PyQt5 用管理员身份打开cmd 输入"pip3 install PyQt5".如果出现超时报错,就使用命令“pip3 --default-timeout=100 install PyQt5 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com” 亲测有效
-
安装lxml 命令“
pip3 install lxml"
- 安装labelimg 下载地址https://github.com/Xminghua/labelImg 放在自己指定目录中解压
- 进入labelimg-master文件夹内打开powershell,依次输入
pyrcc5 -o resources.py resources.qrc
python labelImg.py
如果报错
则需要将labelimg-master文件夹内的resources.py复制到labelimg-master文件夹内的libs中。
再次输入上面两条命令便可成功打开