C:\Users\Department\.qgis2\python\plugins\np>pyrcc4 -py2 resources.qrc -o resources.py

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

operable program or batch file.

How do I solve this problem?

  • 1
    Do you use the OSGeo4W Shell for the command? The Windows commander doesn't work in this way. QGIS 2.18.x: The pyrcc4.exe is found in `C:\Program Files\QGIS 2.18\bin`.
    – Stefan
    Commented Sep 13, 2018 at 9:15

2 Answers 2


You should use OSGEO Shell to run this command.

Go to Start Menu and search for OSGEO Shell, and then command prompt window will be open.

Now type cd C:\Users\Department.qgis2\python\plugins\np> in the shell, and press enter.

It will set the current directory to the plugin directory.

Now run your pyrcc4 command.

You can also follow detailed tutorial here


for me adding the pyrcc4 path to system environment variables made it work C:\Users\BenBouali\AppData\Local\Programs\Python\Python35\Lib\site-packages\PyQt4

  • 1
    In your path, we can read Python35 and PyQt4. This won't work with QGIS. QGIS 3 uses Qt5/PyQt5 and Python 3. QGIS 2 uses Qt4/PyQt4 and Python 2. So there is an incompatibility. You must switch to pyrcc5 with QGIS 3
    – etrimaille
    Commented Apr 12, 2019 at 12:51
  • i needed pyrcc4 for compatibility with a few things, i don't need pyrcc all that much i'm just showing people a possible path to the executable, maybe it'd help someone?
    – Kream
    Commented Apr 12, 2019 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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