[QGIS-Developer] Is there a recommended way to include external Python packages

C Hamilton adenaculture at gmail.com
Thu Jul 21 10:33:56 PDT 2022


Generally speaking it is not recommended, but I have done it with several
of my plugins (KML Tools, Date/Time Tools). If your python package is OS
dependent (not pure python) then you don't want to include it with your
plugin. My Density Analysis plugin can use the optional H3 library (which I
think might be worthwhile for QGIS to include as a part of its libraries),
but it is machine dependent so I did not include it. It is not ideal to
have users pip install the library, but you have to weigh the costs vs. the
benefits of using some library.

Good luck!

On Thu, Jul 21, 2022 at 1:19 PM Gerald Kogler via QGIS-Developer <
qgis-developer at lists.osgeo.org> wrote:

> I'm actually developing a QGIS plugin which depends on pysftp package to
> upload files to a server. For now I thought on asking users to install
> it manually, but it would be great to automatize the installation process.
>
> So the options I see would be:
> 1. Install external package using pip from inside the plugin.
> 2. Include and ship external package with the plugin.
> 3. Ask user to install it manually using pip install.
>
> Is there a recommended way to handle this situation?
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220721/64783f83/attachment.htm>


More information about the QGIS-Developer mailing list