labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

Can't use labelImg.py on Windows

Open KCSoftDL opened this issue 3 years ago • 4 comments

I have installed Python, PyQt5 and install lxml,but when I run labelImg.py ,there are some error run,like this:

-->(tf2) D:\Programming\tool\labelImg>pyrcc5 -o libs/resources.py resources.qrc -->(tf2) D:\Programming\tool\labelImg>python labelImg.py Traceback (most recent call last): File "labelImg.py", line 27, in import resources ModuleNotFoundError: No module named 'resources'

  • **OS:**Windows
  • **PyQt version:**PyQt 5.15

KCSoftDL avatar Apr 23 '21 03:04 KCSoftDL

in addition to pyrcc5 -o libs/resources.py resources.qrc in the root directory, try

cd ./libs/
pyrcc5 ../resources.qrc -o resources.py
cd ..
python labelImg.py

I think this would help.

wenh06 avatar May 07 '21 02:05 wenh06

I don't know if I'm doing anything wrong on my end, but I keep getting an error that the resources.qrc file does not exist. The root directory for labelImg is C:\Users\Shamik\Anaconda3\pkgs\labelimg-1.8.6-py38haa244fe_0\Lib\site-packages When I try to run pyrcc5 -o libs/resources.py resources.qrc, I get the following error message: \PyQt5\pyrcc_main.py: File does not exist 'resources.qrc' Where is resources.qrc supposed to be in relation to it?

hummingbird1989 avatar Oct 12 '21 15:10 hummingbird1989

I am getting an error while installing labelImg

Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "C:\Users\mcvan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts\pyrcc5.exe_main.py", line 4, in File "C:\Users\mcvan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PyQt5\pyrcc_main.py", line 21, in from PyQt5.QtCore import PYQT_VERSION_STR, QDir, QFile ImportError: DLL load failed: The specified module could not be found. How do I resolve this?

VibhaMC avatar May 24 '23 15:05 VibhaMC

This line of code from a tutorial helped me and it fixed the issue if os.name == 'posix': !cd {LABELIMG_PATH} && make qt5py3 if os.name =='nt': !cd {LABELIMG_PATH} && pyrcc5 -o libs/resources.py resources.qrc

This was run in a juypter notebook in pycharm python 3.11 pipenv

VitorBorges2023 avatar Aug 20 '23 18:08 VitorBorges2023