I'm having difficulty building QGIS plugins using the new Mac OS Sierra. I can compile the resources using

pyrcc5 resources.py resources.qrc

and the plugin displays in QGIS, but the message 'This plugin is broken. No module name PyQt5'

I have PyQt5 installed on my computer, but it seems that it may not be in Qgis 2.16?

I'm also not certain that PyQt4 works in Sierra. I have some experience with python and building plugins, but am pretty new to command line.

  • QGIS 2.16 requires Qt4. It will not work with Qt5. Only QGIS 3 will support Qt5.
    – underdark
    Nov 8, 2016 at 20:02

2 Answers 2


It is actually possible to do this using the QGIS Plugin Builder, but you have to manually change the created resources.py file from PyQt5 to PyQt4 before you use the make command


I finally got PyQt4 running on Sierra. There is a bug in glib that makes it really difficult (PyQt4 assumes GNU iconv, GLIB insists on linking in the native version. I had to hand edit the Makefile in the glib to link in the correct version, and I had to munge configure to make sure it is the correct version.

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.