Labelimg there will be several pits in the installation, fill it here.
Note: When I send this blog, the versions of the relevant libraries are:
Python 3.6.4
Pyqt5 5.10.1
Pyqt5-tools 5.9.0.1.2
Labelimg 1.7.0
I use Anaconda, so Anaconda prompt as the terminal:
In Anaconda prompt, run the following command in turn (note case):
Install install pyqt5-install Install labelimg
After all the packages have been installed, run the labelimg, and the first run will be an error, with the following information:
Traceback (most recent call Last): File"e:\anaconda3\lib\runpy.py", line193,inch_run_module_as_main"__main__", Mod_spec) File"e:\anaconda3\lib\runpy.py", line -,inch_run_code EXEC (code, run_globals) File"E:\Anaconda3\Scripts\labelImg.exe\__main__.py", line5,inch<module>File"e:\anaconda3\lib\site-packages\labelImg\labelImg.py", line in,inch<module>Import resourcesmodulenotfounderror:no module named'Resources'
Note the path in the last error message: e:\anaconda3\lib\site-packages\labelImg\labelImg.py. Locate and open this file in Explorer:
In the 29th line of the document, there is import resources . Change this sentence to from . Import Resources . Note that there is a space between the From and before import.
save and close .
Open the resources.py file under this path to change the from PyQt4 import qtcore of line 10th to from PyQt5 Import Qtcore ;
qt_resource_data = "\ change to qt_resource_data = b" on line 12th \ (That is, add a B)
The same will be the No. 8581 line of qt_resource_name = "\ change to qt_resource_name = B" \
qt_resource_struct = "\ change to qt_resource_struct = B" on line 12th \
save and close .
After that, you can open the program by running LABELIMG in the Anaconda prompt.
LABELIMG Official website: https://tzutalin.github.io/labelImg/
LABELIMG Installation Guide