win10 + anconda install labelImg

Because I am a novice, a lot of information on the Internet is not detailed enough, and it takes a long time to create something. Now I will record the tortuous process.

Prerequisite: Anconda is installed on win10.
1. Go to github and download the labelImg download address . Because of the resources, it is best to use Thunder to download, otherwise it will not work for a long time.

2. Unzip the downloaded labelImg-master.zip to a folder without a Chinese path, and rename the folder to labelImg.

3. Start the anconda virtual environment. Because labelImg needs to rely on pyqt5, you must first install pyqt5 and execute the command. An error conda install pyqt=5may be reported here, probably because the http network connection cannot be used. At this time, you need to modify the .condarc file (this file requires Search for something. It is recommended to use everything search. You can find the file quickly. Mine is under the C:\Users\306 path). The modified file content is as follows:

channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/
ssl_verify: true
show_channel_urls: true
channel_priority: flexible

After the modification is completed, enter the conda install pyqt=5 command in the virtual environment command window again to install qyqt5.

4. After installing pyqt5, you need to install pyqt5-tools, otherwise the subsequent pyrcc5 conversion of the .qrc file will not be possible. You can use the pip or conda command to install: pip install pyqt5-tools(I didn’t install this tool at the beginning, so pyrcc5 -o resources.py resources.qrcI kept getting an unrecognized command prompt when executing the command)

5. Find the path to the pyrcc5.exe file, and then execute the command: pyrcc5 -o D:\Work\tensorflow\labelImg\libs\resources.py D:\Work\tensorflow\labelImg\resources.qrc Note that in this command, you must add the absolute path to the source file, and the generated resources.py file must be placed in the labelImg\libs\ directory , otherwise execute the next step python labelImg.py will prompt that the module cannot be found

6. Run labelImg: Execute the command under the newly decompressed labelImg path python labelImg.pyto see the UI interface.
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_30072103/article/details/113941309