[PYTHON] No module named What to do if you get'libs.resources'

The beginning of the matter

You need to use annotation tools to do yolo or SDD. ↓ I want to install and use an annotation tool called labelImg on windows10. ↓ labelImg seems to be a tool that can be started by typing python labelImg.py on the command line, so I tried it as described on the website. ↓ No module named'libs.resources' error (← now here)

Operating environment

windows10 anaconda

Flow of error

The site I referred to at the beginning is here https://haitenaipants.hatenablog.com/entry/2018/06/09/235950 If you search for "label Img installation Windows 10" etc., this site will appear at the top, so I think other people will get the same error. (I took a long time to resolve it.) When I ran it exactly as it was written on this site, I got the following error with the following command:

python labelImg.py
[Details of the error]
No module named 'libs.resources'

That is, a warning that there is no module called libs.resources.

If you write from the result, the command you are executing before is wrong,

pyrcc5 -o resources.py resources.qrc

not,

pyrcc5 -o libs/resources.py resources.qrc

Is correct. In other words, resource.py must be created in a folder called libs from the resource.qrc file in the folder downloaded by git clone. (So, make sure that resource.py is created in the libs folder before and after execution)

Further error

After this, when I run python labelImg.py, I get the following error this time:

ModuleNotFoundError: No module named 'lxml'

This error can be resolved by installing lxml with pip as follows.

pip install lxml

Execute the following command again

python labelImg.py

Successful activation of Label Img. I did it. labelImg.png

Summary

If you want to do it again, install labelImg as follows. (For Windows 10) -Start git bash and cd to the folder where you want to put the IabelImg folder. ↓ -Download labelImg with git clone.

git clone https://github.com/tzutalin/labelImg.git

↓ Start anaconda, start Terminal, and execute the following contents.

#Since the GUI of labelImg uses PyQt5, install PyQt5.
pip install PyQt5

#Confirm that it has been installed
pip list

#cd to the labelImg directory
cd xxxx/xxxxx/labelImg

#resource in the libs folder.Create py
pyrcc5 -o libs/resources.py resources.qrc

#Start labelImg, but check that there is no lxml so an error occurs
python labelImg.py
~(abridgement)~
ModuleNotFoundError: No module named 'lxml'

#install lxml
pip install lxml

#Start labelImg again
python labelImg.py

Recommended Posts

No module named What to do if you get'libs.resources'
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
What to do if you get Swagger-codegen in python and Import Error: No module named
ImportError: No module What to do when you are told
What to do if you can't pipenv shell
What to do if you can't pip install mysqlclient
What to do if you get a "No versions found" error in pipenv
What to do if yum breaks
What to do if you are addicted to Windows character code
What to do if you get "coverage unknown" in Coveralls
What to do if you can't sort files with subscripts
What to do if you can't log in as root
What to do if you can't use WiFi on Linux
What to do if Linux VLC can no longer rotate
What to do if you lose your EC2 key pair
What to do if you get `No kernel for language python found` in Hydrogen
What to do if you can't install pyaudio with pip #Python
What to do if you get a minus zero in Python
What to do if you get a UnicodeDecodeError with pip install
What to do if you can't build your project with Maven
What to do if you can't use the trash in Lubuntu 18.04.
What to do if you get an Undefined error:'Module_six_moves_urllib_parse' object has no attribute'urlencode' on MacOS
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
Let's summarize what you want to do.
If you can't use Beautiful Soup 4 after updating to Python 3.5. ImportError: No module named bs4
What to do if you install openCV3 and make a symbolic link, but when you do "import cv2", "No module named'cv2'" appears
What to do if you can't find well with grep's -f option
What to do if you can't find PDO in Laravel or CakePHP
What to do if you couldn't send an email to Yahoo with Python.
What to do if you can't use scikit grid search in Python
What to do if you forget your login password on Manjaro Linux
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What to do if you get stuck during Anaconda installation on Linux
What to do if No Python documentation found for ... appears in pydoc
What to do if you get a TypeError with numpy min, max
What to do if you get an error when trying to load mnist
What to do if you can't install with pip in babun environment
What to do if you get Could not fetch URL 443 with pip
What to do if you get an error when installing Dlib (Ubuntu)
What to do if pipreqs results in UnicodeDecodeError
Note: What to do if pip install fails
What to do if mod_fcgid cannot resolve UnicodeEncodeError
What to do if rails s doesn't work
What to do if pip cannot be installed
What to do if atom autocomplete-python doesn't work
What to do if Docker-sync suddenly stops working
What to do if you get the error Target WSGI script'/var/www/xxx/xxx.wsgi' cannot be loaded as python module
What to do if you get angry with swapon failed: Operation not permitted
What to do if you get an error when installing python with pyenv
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do if pip install fails in Xcode 5.1
What to do if SciPy installation fails on CentOS
Links to do what you want with Sublime Text
What to do if a UnicodeDecodeError occurs in pip
pipenv shell is no longer available ... what to do?
What to do if pip install fails to install dependent libraries
What to do if sys / cdefs.h does not exist
What to do if pyenv is not enabled (zsh)
What to do when you can't bind CaboCha to Python