[Qgis-user] ReportLab integration into QGIS returns error message "no module named reportlab"

Ludwig Kniprath ludwig at kni-online.de
Mon May 9 00:53:20 PDT 2022


Hi,

Python inside QGis has no access to plugins installed by pip if called 
from normal shell.

But running "pip install reportlab" from the osgeo4w-shell should do it.


"pip show reportlab" after pip-from-shell-installation returns

"Location: 
c:\users\ludwi\appdata\local\programs\python\python39\lib\site-packages"

and "import reportlab" in QGis Python Console results 
"ModuleNotFoundError: No module named 'reportlab'"


"pip show reportlab" after osgeo4W-shell-installation returns

"Location: c:\users\ludwi\appdata\roaming\python\python39\site-packages"

and no error with "import reportlab" in QGis Python Console


Ludwig

Am 09.05.2022 um 04:52 schrieb julio cesar oliveira via Qgis-user:
> Dears,
>
> I want to use ReportLab in my own plugin which I have written for QGIS.
>
> I have installed ReportLab for the python versions 3.10.
>
> The package is respectively installed into the site-packages folder 
> (e.g. 
> C:\Users\olive\AppData\Local\Programs\Python\Python310\Lib\site-packages\reportLab).
>
> If I want to use the tool in my plugin (from reportlab.pdfgen import 
> canvas), the plugin returns the error "ImportError: no module named 
> reportLab".
>
> **************************************************************************
>
> C:\PyQgis\cav> pip install reportlab
>
> Requirement already satisfied: reportlab in 
> c:\users\olive\appdata\local\programs\python\python310\lib\site-packages 
> (3.6.9)
> Requirement already satisfied: pillow>=4.0.0 in 
> c:\users\olive\appdata\local\programs\python\python310\lib\site-packages 
> (from reportlab) (9.1.0)
>
> **************************************************************************
>
> Do you have any other suggestions or ideas?
>
>
> Thanks
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220509/302f4afe/attachment.htm>


More information about the Qgis-user mailing list