<div dir="ltr">Thanks Ujaval,<div><br></div><div>I was just about to respond as I found this: <a href="https://docs.qgis.org/3.4/en/docs/pyqgis_developer_cookbook/intro.html#running-custom-applications">https://docs.qgis.org/3.4/en/docs/pyqgis_developer_cookbook/intro.html#running-custom-applications</a></div><div><br></div><div>Your method looks completely different to that documented above. As I've already started with the above method, I will continue unless I exhaust that as an option.</div><div><br></div><div>I managed to get a docker image running (debian)  with qgis installed, however these values I am using are no doubt wrong.</div><div><font face="monospace">ENV PYTHONPATH=/usr/share/qgis/python<br>ENV LD_LIBRARY_PATH=/usr/lib/qgis</font><br></div><div><br></div><div>Could anyone suggest how I might find the correct values? At this stage, python is not finding the packages "qgis.core.Qgis" == module not found</div><div><br></div><div>Thanks in advance,</div><div>Andrew</div><div><br></div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 8 Jun 2022 at 17:12, Ujaval Gandhi <<a href="mailto:ujaval@spatialthoughts.com">ujaval@spatialthoughts.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Yes. Configuring system paths to point to qgis libraries will allow native python to work with pyqgis. I have a complete example for Mac which can be easily adapted for a linux based system.<div><a href="https://courses.spatialthoughts.com/pyqgis-in-a-day.html#writing-standalone-python-scripts" target="_blank">https://courses.spatialthoughts.com/pyqgis-in-a-day.html#writing-standalone-python-scripts</a><br><div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><div><table cellpadding="0" cellspacing="0" style="border-spacing:0px;border-collapse:collapse;color:rgb(68,68,68);width:480px;font-size:10pt;font-family:Arial,sans-serif;line-height:normal"><tbody><tr><td valign="top" style="padding:10px 0px 12px;width:160px;vertical-align:top"><a href="https://spatialthoughts.com/" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img border="0" alt="Logo" width="141" src="https://spatialthoughts685850346.files.wordpress.com/2019/12/spatial_thoughts_logo.png" style="border: 0px; vertical-align: middle; width: 141px; height: auto;"></a></td><td style="padding:6px 0px;width:320px"><table cellpadding="0" cellspacing="0" style="border-spacing:0px;border-collapse:collapse;background-color:transparent"><tbody><tr><td style="padding:0px;font-size:12pt;font-family:Arial,sans-serif;font-weight:bold;color:rgb(61,60,63)"><span style="color:rgb(0,175,239)">Ujaval Gandhi</span></td></tr><tr><td style="padding:0px 0px 11px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(61,60,63)"><span style="color:rgb(0,175,239)">Spatial Thoughts</span></td></tr><tr><td style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>mobile: +91-8095684687</span></td></tr><tr><td style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>email: </span><span style="color:rgb(23,147,210)"><a href="mailto:ujaval@spatialthoughts.com" target="_blank">ujaval@spatialthoughts.com</a></span></td></tr><tr><td style="padding:6px 0px 0px"><span style="display:inline-block;height:22px"><span><a href="https://www.linkedin.com/in/spatialthoughts/" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img alt="LinkedIn icon" border="0" width="23" height="23" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/ln.png" style="border: 0px; vertical-align: middle; height: 20px; width: 20px;"></a>  </span><span><a href="https://twitter.com/spatialthoughts" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img alt="Twitter icon" border="0" width="23" height="23" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/tt.png" style="border: 0px; vertical-align: middle; height: 20px; width: 20px;"></a>  </span></span></td></tr></tbody></table></td></tr><tr><td colspan="2" style="padding:8px 0px 0px;border-top:1px solid rgb(23,147,210);width:480px;font-family:Arial,sans-serif;color:rgb(155,155,155);text-align:justify"></td></tr></tbody></table><br></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 8, 2022 at 7:25 AM Andrew Hughes via Qgis-user <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>Q: Is it possible to have a system/native python install work with PyQGIS? </div><div><br></div><div>Finer Details: I am working with Azure Functions. Their base (container/docker) image includes a python install. I can provide a custom docker image, thus I can set system paths and run all the instructions as per this <a href="https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu" target="_blank">https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu</a> so that QGIS is installed on the container. But, I doubt my (function) app can be configured to run a-top of the QGIS python install that is bundled with QGIS.</div><div><br></div><div>Also, I don't know if conda is an option - would prefer to assume not at this point in time as that doesn't align with local development tooling that is based on venv.</div><div><br></div><div>Things I am hoping to see:</div><div>Yes - but you need to set a PATH.... or PYTHONPATH....</div><div>Yes - but need to see ..... in requirements.txt</div><div>No - impossible, fill your boots....</div><div><br></div><div>Thanks for reading</div><div>Andrew</div><div><br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>
</blockquote></div>