[QGIS-Developer] QGIS plugin depends on pypi package

John Lindsay jlindsay at uoguelph.ca
Fri Jan 19 10:16:15 PST 2024


Agreed, when I 'print(sys.executable)' from within the QGIS Python Console (on my MacBook Pro), I see:


/Applications/QGIS.app/Contents/MacOS/QGIS


But from my system terminal, I see:


/Library/Frameworks/Python.framework/Versions/3.11/bin/python3

So QGIS, at least on a Mac, does seem to have it's own version of Python installed. And there is not clear way, again on a Mac at least, to pip install to the QGIS Python such that a plugin will be able to see a package. Now, this said, on my Linux machine, installing my Whitebox Workflows plugin did not run into an error at all and so I'm left wondering if this is perhaps, as Greg suggested, a particular binary distribution issue related to QGIS on MacOS. Could be.

Regards,

John


Prof. John Lindsay

Dept. of Geography, Environment & Geomatics,

The University of Guelph,

Room 122, Hutt Building,

E-mail: jlindsay at uoguelph.ca

Phone: (519) 824-4120 ext. 56074

Web: https://geg.uoguelph.ca/faculty/lindsay-john

Research page: https://jblindsay.github.io/ghrg/index.html

WhiteboxTools GIS project: https://www.whiteboxgeo.com/

Twitter: https://twitter.com/whiteboxgeo

________________________________
From: David Strip <qgis-dev at stripfamily.net>
Sent: Friday, January 19, 2024 1:10 PM
To: Greg Troxel <gdt at lexort.com>; John Lindsay <jlindsay at uoguelph.ca>
Cc: John Lindsay via QGIS-Developer <qgis-developer at lists.osgeo.org>
Subject: Re: [QGIS-Developer] QGIS plugin depends on pypi package


CAUTION: This email originated from outside of the University of Guelph. Do not click links or open attachments unless you recognize the sender and know the content is safe. If in doubt, forward suspicious emails to IThelp at uoguelph.ca.


On 1/19/2024 10:59 AM, Greg Troxel via QGIS-Developer wrote:

When you say "qgis seems to use its own version", I wonder if that is in
the context of particular binary distribution.  And if there really is a
full extra copy of libs, or if it's about a per-user site-packages
directory.

The OS4Geo binary distribution contains a Python39 directory which is a full python installation including python.exe, a Lib directory which in turn contains a site-packages directory. As least in my case, this is installed system-wide, not per-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240119/b0f244f1/attachment.htm>


More information about the QGIS-Developer mailing list