<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">Hello everyone,</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
</span></div>
<div class="elementToProof" style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">I am developing a new QGIS plugin (</span><span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><a href="https://plugins.qgis.org/plugins/whitebox_workflows_for_qgis/#plugin-manage" id="LPlnk167391">https://plugins.qgis.org/plugins/whitebox_workflows_for_qgis/#plugin-manage</a></span><span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">)
 that serves as a frontend for a Python geospatial analysis library called Whitebox Workflows for Python (WbW). The plugin seems to work well with on major exception, it requires that the user have WbW installed. It can be installed quite easily using pip (pip
 install whitebox-workflows), however, I know that QGIS uses its own localized version of Python, which seems to lack a terminal app access (at least on MacOS). Besides, a better solution would be for the plugin to install this package via pip when it is itself
 first installed and launched. I tried to accomplish this with the following code:</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><a href="https://github.com/jblindsay/whitebox_workflows_for_qgis/blob/4e463262f6cfd1987afa2f3f7e0e79656eb8d27e/whitebox_workflows_for_qgis_provider.py#L56" target="_blank" id="OWAd2690c2b-c8d5-4324-b0d7-a2434bc6158d" class="OWAAutoLink" rel="noopener noreferrer" data-auth="NotApplicable" data-linkindex="0" style="margin: 0px;">https://github.com/jblindsay/whitebox_workflows_for_qgis/blob/4e463262f6cfd1987afa2f3f7e0e79656eb8d27e/whitebox_workflows_for_qgis_provider.py#L56</a></span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 15px; color: rgb(36, 36, 36); font-weight: 400;"><br>
</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">This code, which runs whenever the plugin is launched, first checks to
 see if whitebox_workflows can be imported and if not, it runs pip from the Python script to install it. Unfortunately, some users have reported issues with this not working correctly:</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><a href="https://github.com/jblindsay/whitebox_workflows_for_qgis/issues/1" target="_blank" id="OWA45fa6a2e-fb7f-1e7b-50bb-9534f5e16eb5" class="OWAAutoLink" rel="noopener noreferrer" data-auth="NotApplicable" data-linkindex="1" style="margin: 0px;">https://github.com/jblindsay/whitebox_workflows_for_qgis/issues/1</a></span></div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<div style="margin: 16px 0px; max-width: 800px; min-width: 424px;">
<div style="margin: 0px; height: 116px;">
<div style="text-align: left; margin: 0px;"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 15px; color: rgb(36, 36, 36); font-weight: 400;">
<button type="button" class="ms-Button ms-Button--icon wD8TJ root-685" title="Show original size" data-is-focusable="true" style="border:none;font-size:16px;font-family:controlIcons !important;margin:0px;padding:8px;outline:transparent;border-radius:2px;box-sizing:border-box;cursor:pointer;display:inline-block;text-decoration:none;text-align:center;width:32px;height:32px;user-select:none;box-shadow:0 0 5px var(--neutralSecondary);left:5px;top:5px;z-index:1">
<div style="text-align: left; line-height: 16px; margin: 0px 4px; height: 16px; display: inline-block;">
<span style="font-family: controlIcons;"></span></div>
</button></span></div>
<table id="LPContainer627363" style="text-align: left; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px; width: 1004.07px;">
<tbody>
<tr>
<td style="text-align: left;">
<div style="text-align: left; margin: 0px 12px 0px 0px; height: 120px;"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 15px; color: rgb(36, 36, 36); font-weight: 400;"><a href="https://github.com/jblindsay/whitebox_workflows_for_qgis/issues/1" target="_blank" id="LPImageAnchor627363" rel="noopener noreferrer" data-auth="NotApplicable" data-linkindex="2" style="margin: 0px;"><img id="LPThumbnailImageId627363" width="240" height="120" style="width: 240px; height: 120px; margin: 0px; display: block;" src="https://opengraph.githubassets.com/a248a1a51b43baa531f4fdf47f85868a01c5785c3dded22234ce269d2c64c9e4/jblindsay/whitebox_workflows_for_qgis/issues/1"></a></span></div>
</td>
<td style="text-align: left; width: 692.07px;">
<div style="text-align: left; margin: 0px 8px 12px 0px;"><span style="letter-spacing: normal; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 21px; color: rgb(36, 36, 36); font-weight: 300;"><a href="https://github.com/jblindsay/whitebox_workflows_for_qgis/issues/1" target="_blank" id="LPUrlAnchor627363" rel="noopener noreferrer" data-auth="NotApplicable" data-linkindex="3" style="text-decoration: none; margin: 0px;">Installation
 in QGis fails · Issue #1 · jblindsay/whitebox_workflows_for_qgis</a></span></div>
<div style="text-align: left; margin: 0px 8px 12px 0px; max-height: 100px;"><span style="letter-spacing: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; color: rgb(102, 102, 102); font-weight: 400;">AttributeError:
 'NoneType' object has no attribute 'write' Traceback (most recent call last): File "C:\\Users/thomas.struller/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\whitebox_work...</span></div>
<div style="text-align: left; margin: 0px; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; color: rgb(166, 166, 166);">
<span style="letter-spacing: normal; font-weight: 400;">github.com</span></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">So now I'm left trying to figure out what the recommended approach to
 installing QGIS plugin dependencies is. Any advice from anyone that has successfully dealt with this problem previously? Thanks.</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">Regards,</span></div>
<div style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
</span></div>
<div class="elementToProof" style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">John Lindsay</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<p style="margin-top: 0px; margin-bottom: 0px;">Prof. John Lindsay</p>
<p style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Arial, Helvetica, sans-serif;">
<span style="font-size: 12pt; color: rgb(0, 0, 0);">Dept. of Geography, Environment & Geomatics,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Arial, Helvetica, sans-serif;">
The University of Guelph,</p>
<p style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Arial, Helvetica, sans-serif;">
Room 122, Hutt Building,</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">E-mail: jlindsay@uoguelph.ca</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;">Phone: (519) 824-4120 ext. 56074</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Web: <a href="https://geg.uoguelph.ca/faculty/lindsay-john" style="margin-top: 0px; margin-bottom: 0px;">
https://geg.uoguelph.ca/faculty/lindsay-john</a></p>
<p style="margin-top: 0px; margin-bottom: 0px;">Research page: <a href="https://jblindsay.github.io/ghrg/index.html" title="https://jblindsay.github.io/ghrg/index.html" style="margin-top: 0px; margin-bottom: 0px;">
https://jblindsay.github.io/ghrg/index.html</a></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">WhiteboxTools GIS project:
<a href="https://www.whiteboxgeo.com/" style="margin-top: 0px; margin-bottom: 0px;">
https://www.whiteboxgeo.com/</a></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Twitter:
<a href="https://twitter.com/whiteboxgeo" style="margin-top: 0px; margin-bottom: 0px;">
https://twitter.com/whiteboxgeo</a></span><br>
</p>
</div>
</div>
</body>
</html>