I am following a tutorial developing a Python plugin in QGIS. After completing the script for the plugin I got the following message the next time I started QGIS. Warning I am a complete novice with Python programming if this is the issue

Couldn't load PyQGIS. Python support will be disabled.

Traceback (most recent call last): File "", line 1, in File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis__init__.py", line 26, in from qgis.PyQt import QtCore ImportError: No module named PyQt

  • 1
    Which tutorial are you following? Was it written for QGIS3? Note that QGIS3 uses Python3 and all old tutorials are for Python2 and therefore won't work. – underdark Mar 2 at 9:08
  • 1
    how did you install qgis, did you include python in the install – Ian Turton Mar 2 at 9:59
  • Its QGIS by Example by Packt Publishing. It was written for 2.8. Python was working fine in QGIS. I had some script wrong in the plugin, changed it and now can't load python in QGIS – Sean Jarrett Mar 2 at 16:11

Your Answer

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

Browse other questions tagged or ask your own question.