labelImg: 'pyrcc5' is not recognized as an internal or external command

Question:

I’m trying to install lalbelImg for The Tensorflow Object Detection API.

Everything is going well until I try to run the command:

pyrcc5 -o libs/resources.py resources.qrc

It give me error:

'pyrcc5' is not recognized as an internal or external command,
 operable program or batch file.

I’m on Windows 10 and have Python 3.5.4

I’m following the tutorial for windows on tzutalin’s Github.

Link: https://github.com/tzutalin/labelImg#user-content-windows

PS: I don’t use Anaconda.

Asked By: code lover

||

Answers:

Turns out I have to give the full directories.

C:Python35Scriptspyrcc5 -o C:DesktoplabelImglibsresources.py C:DesktoplabelImgresources.qrc

Copy Paste that and change the directories if needed.

Have an awesome day! – CodeLover

Answered By: code lover

That means you didn’t specify the path

To set the path

Search for edit environment variable -> environment variable -> new -> here add path of that

This error occurred when path is not specified

Answered By: Suraj Virkar

Not a Problem

Just find the pyrcc5.exe file from your search bar then copy it and paste it in your labelimg folder or where you have downloaded all other files from github

Answered By: UNMILON PAL

copy the path of labelimg extracted file and paste it in anaconda prompt. e.g

(base) C:Windowssystem32>cd C:UserssaddaDesktoplabelImg-master

this is the path of the labelimg : cd C:UserssaddaDesktoplabelImg-master

then,
copy and paste the : pyrcc5 -o libs/resources.py resources.qrc

C:UserssaddaDesktoplabelImg-master>pyrcc5 -o libs/resources.py resources.qrc

Answered By: saddam

This Worked for me

"C:UsersSarananaconda3Librarybinpyrcc5.bat" -o libs/resources.py resources.qrc
Answered By: Saran_StackOverflow

The following code worked for me. Try to find the location of pyrcc5 file, resources.py and resources.qrc file then change it according to your location.

C:Userslenovominiconda3envslabelmeScriptspyrcc5.exe -o
F:labelmg_masterlabelImgvenvLibsite-packagespip_vendordistlibresources.py
F:labelmg_masterlabelImgresources.qrc
Answered By: ASIF

if you are using anaconda, download PyQt library using below command
conda install pyqt=5
Go to the labelImg folder and use the following command (replace your user name in the drive)
C:Usersvignehanaconda3pkgspyqt-5.9.2-py39hd77b12b_6Librarybinpyrcc5 -o resources.py resources.qrc

Answered By: vignesh kannaa

In my case I was trying to use pyrcc5 outside of the virtual environment PyQt5 was installed in.

Answered By: lli45

I experienced the same error. I opened the labelimg folder in cmd and used ./pyrcc5 -o libs/resources.py resources.qrc . It worked for me.