Monday 19 February 2018

ReportLab integration into QGIS returns error message "no module named reportlab"


I want to use ReportLab in my own plugin which I have written for QGIS. I have installed ReportLab for the python versions 2.4, 2.5 and 2.6. The package is respectively installed into the site-packages folder (e.g. C:/Python24/Lib/site-packages/reportLab).


If I want to use the tool in my plugin, the plugin returns the error "ImportError: no module named reportLab". I have set the path to the modul into the environment variables, but this doesn´t help.


I try to import the module by "from reportLab.pdfgen import *".


Do you have any other suggestions or ideas?




Answer



If you want Qgis to use the python lib, you have to put it in


C:\Programs\Quantum GIS Lisboa\apps\Python27\Lib\site-packages


(or whereever your Qgis is installed to). The C:\Python24 installation will not be used by Qgis.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...