安裝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
- 成功出現如下界面。