8

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
  • 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
14

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.

  • 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
2

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

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.