1

I have used the plugin builder QGIS 1.8 to create an empty plugin. The next step is to compile the ui file using pyuic. pyuic.py runs but halts at the line with from PYQt4 import QTCore and an error message of 'No module named PyQt4' is displayed. I am using an OSGeo Install and I also have an install of last weeks master. Using the plugin builder in the master produces the same issue.

It could be a path issue and if anyone replies, setting the path is part of the answer, knowing where to set the path is the other part.

Could someone also briefly explain what python is looking for when is is looking for a module. I am guessing that it is looking for a dll but it could be looking for an API or even a py / pyc file. Unless I can first check that the module exists with Windows explorer and can find its path, I will not later be able to set a path.

An alternative would be use gnu make or other compiler to compile the plugin using the make file produced by the plugin builder. Is there a compiler that makes this simple (a pre-compiled windows installer that comes with instructions on how the compiler with a make file)?

Can QT Designer compile the ui files that it edits?

Andrew M

  • Are you running pyuic4 inside the osgeo4w shell? – Nathan W Aug 1 '13 at 8:11
  • No. from a batch file. I then call the batch file from a command window opened with 'cmd /k' which forces the batch file command window which opens on when the batch file runs to stay open so that I can read the error message. Can you run a batch file from the OSGEO shell? – AndrewM Aug 1 '13 at 8:36
  • Using the OSGeo shell works. Would like to know where a command reference for the OSGEO shell can be found. – AndrewM Aug 1 '13 at 9:06
  • 2
    C:\OSGeo4W\OSGeo4W.bat is the file that is called for the shell. Or the same file will be in your weekly build install folder. – Nathan W Aug 1 '13 at 9:15

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.