安装python3.7
- 官方https://www.python.org/downloads/windows/,下载windows 64bit python3.7版本
- 用Administrator权限运行安装文件。
- 勾选Add Python 3.7 to PATH
- 其余默认设置,一般不会出问题。
安装lxml
- pip3
install lxml - If
you fail to build lxml on your MS Windows system from the signed and
tested sources that we release, consider using the binary builds
from PyPI or the unofficial Windows binaries that Christoph Gohlke
generously provides. - https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml,下载其中的lxml-4.2.3-cp37-cp37m-win_amd64.whl
- 在刚下载的whl文件所在目录,运行pip3
install lxml-4.2.3-cp37-cp37m-win_amd64.whl,即可安装lxml
安装PyQt
- pip3
install PyQt5 - 由于网速太慢,我切换到了迅雷下载,下载的文件是PyQt5-5.11.2-5.11.1-cp35.cp36.cp37.cp38-none-win_amd64.whl
下载路径:https://files.pythonhosted.org/packages/5d/85/d174a50e0d6b60aa9113f6a32afb31f25345bec8584992af486235373252/PyQt5-5.11.2-5.11.1-cp35.cp36.cp37.cp38-none-win_amd64.whl
(93.3MB) - 然后在文件所在目录运行如下命令:
pip3
install PyQt5-5.11.2-5.11.1-cp35.cp36.cp37.cp38-none-win_amd64.whl
安装labelImg
- 运行:
pyrcc5 -o resources.py resources.qrc
注:本来是pyrcc4
-o resources.py resources.qrc,由于我用PyQt5所以用pyrcc5
运行labelImg
- python
labelImg.py 或者
py
labelImg.py - 成功出现如下界面。
h1 { margin-bottom: 0.08in; direction: ltr; color: rgba(0, 0, 10, 1); text-align: justify }
h1.western { font-family: "Liberation Sans", serif; font-size: 14pt; font-weight: normal }
h1.cjk { font-family: "Noto Sans CJK SC Regular"; font-size: 14pt; font-weight: normal }
h1.ctl { font-family: "FreeSans"; font-size: 14pt; font-weight: normal }
p { margin-bottom: 0.1in; direction: ltr; color: rgba(0, 0, 10, 1); line-height: 120%; text-align: justify }
p.western { font-family: "Calibri", serif; font-size: 10pt }
p.cjk { font-family: "宋体"; font-size: 10pt }
p.ctl { font-size: 12pt }
a:link { color: rgba(0, 0, 255, 1) }