I installed Qgis 3.0 on windows 10. I get this error everytime i run the pyrcc4 or pyrcc5 command:

'pyrcc4' is not recognized as an internal or external command,

Even if I find a place with a pyrcc4.exe file or a place with apyrcc5.bat file and add the path to the environment variables I get the same error. In the previous installation of osgeo4w i had a pyqtdev folder or something similar appear I think it was on C/. Was there supposed to be such a folder, do I need to download pyqt separately?

  • you have a bats and a exe in bin folder,for example D:\OSGeo4W64\bin – Fran Raga Mar 5 '18 at 11:04
  • I have no pyrcc4 or pyrcc5 bat or exe in the bin folders... – Carmel Han Mar 5 '18 at 13:56
  • pyrcc5 are inside Python36\Scripts and pyrcc4 in a bin,try reinstall Qgis maybe – Fran Raga Mar 5 '18 at 14:04
  • 1
    I have a pyrcc5 in: C:\OSGeo4W64\apps\Python36\Scripts, but even though I add the path to the path & python path variables the command pyrcc5 is not recognized – Carmel Han Mar 5 '18 at 14:08
  • @Carmel Han Do you have a QGIS 2.x version also installed in your system? If answer is yes I have a solution. – xunilk Mar 5 '18 at 14:36

Try running a batch file with the following:

@echo off
call "C:\Program Files\QGIS 3.0\bin\o4w_env.bat"
call "C:\Program Files\QGIS 3.0\bin\qt5_env.bat"
call "C:\Program Files\QGIS 3.0\bin\py3_env.bat"

@echo on
pyrcc5 -o resources.py resources.qrc

either place the batch file in your directory with resources.py or type in an absolute path.

| improve this answer | |
  • It works for me. I had another solution but this is better and quicker. +1. – xunilk Mar 8 '18 at 14:23
  • The problem is i also have folders missing. for example I am missing the folder of ".qgis2". That's why i think there is a problem with the instalation of Qgis 3.0.0 – Carmel Han Mar 11 '18 at 11:40
  • do you mean C:\users\USERNAME\.qgis2? In QGIS3.0, this has been moved to C:\users\USERNAME\AppData\Roaming\QGIS\QGIS3 – Kezah Mar 11 '18 at 22:02
  • Works great, but need to adjust the path in the calls to the installed qgis-version. I.e for me today c:\program files\qgis 3.10\bin – MortenSickel Jan 27 at 9:29
  • In case anyone is getting the following error - C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\PyQt5\pyrcc_main.py: File does not exist 'resources.qrc' Do a search for 'resources.qrc'. I found it in the plugin that I had just created with QGIS plugin builder. Then, make sure to edit the batch file described above to point to the absolute path of resources.qrc. This solved my problem. – jonesy19 Jun 2 at 12:49

For an additional information for people using ubuntu you can install libs like this

sudo apt-get update
sudo apt-get install pyqt5-dev-tools
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.