Compiling custom plugins for QGIS on Windows

by Krzysztof ┼╗uraw   Last Updated June 12, 2019 22:22 PM

I've made my first plugin using plugin builder and I want to compile it. I read that I need two commands to do it under windows: pyuic4 and pyrcc4. But when I use any of these commands I get this:

D:\Programy\QGis\bin>pyuic4 -o C:\Users\noaal\.qgis2\python\plugins\Test\
ImportError: No module named site

I also read that I must change system path in windows, but I don't know to which location. So anyone have any clue?

Answers 2

One method to compile custom-made plugins is to run the cmd prompt or the OSGeo4W shell via:

Start > QGIS folder > _OSGeo4W

Type cd, enter the directory of your plugin to make that the current directory and then type make. This should compile your plugin.

October 02, 2014 15:25 PM

The marked answer from 'Joseph' is either not complete or obsolete.

With OSGeo4W QGIS version 3.6.3: The 'make' executable is not available in OSGeo4W.

Installing gmake doesn't help because the Makefile emits a message about using 'pb_tool' instead and fails to build the project.

June 12, 2019 22:18 PM

Related Questions

Updated December 03, 2016 08:09 AM

Updated June 26, 2015 14:09 PM

Updated July 08, 2018 11:22 AM

Updated July 20, 2018 07:22 AM

Updated March 05, 2018 18:22 PM