labelImg
labelImg copied to clipboard
Can't use labelImg.py on Windows
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
- **OS:**Windows
- **PyQt version:**PyQt 5.15
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.
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?
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
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