To compile resources.qrc file with pyrcc5 we usually do



pyrcc5 -o pathtoplugin\resources.py pathtoplugin\resources.qrc

using OSGeo4W Shell as described in many questions on GIS SE and SO.

So far, I never had issues doing so. However, now I am doing it the first time after installing the Standalone version of QGIS 3.20 (https://qgis.org/downloads/QGIS-OSGeo4W-3.20.2-1.msi), and it seems like qt5_env.bat is just not there anymore, and am getting could not find qt5_env.bat when trying to run it via OSGeo4W Shell. A search on my C:\ drive gave the following result:

enter image description here

It's there for all older QGIS 3 versions, but not for 3.20.

Of course, I can simply compile my resources.qrc using 3.18's OSGeo4W Shell or any other older version, but my question is:

Am I missing something really simple or has there anything been changed in 3.20 and how can I compile resources.qrc using 3.20?

1 Answer 1


You no longer need to run qt5_env.bat and py3_env.bat (I guess). Just run

pyrcc5 -o pathtoplugin\resources.py pathtoplugin\resources.qrc

enter image description here

  • Thanks for the hint ! It looks like qt5_env.bat and py3_env.bat disappeared with the switch from .exe to .msi installation files. Batch file pyuic5.bat and pyrcc5.bat disappeared too but pyuic5.exe and pyrcc5.exe are still there.
    – sigeal
    Oct 12, 2021 at 12:52

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.