<div dir="ltr">Just had another standalone path issue.  Not sure if this is a Shapely bug, QGIS packaging bug, or maybe not a bug at all, just a path issue.  Again, versions:<div><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">OSX, version 10.13.6</span><div style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Python 3.6.6</div><div style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">QGIS 3.2.1</div></div><div><br></div><div>In python, I tried:<div><br></div><div>`from shapely.geos import geos_version`</div><div><br></div><div>and got the following error:</div><div><br></div>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/shapely/geos.py", line 111, in <module><br>    _lgeos = load_dll('geos_c', fallbacks=alt_paths)<br>  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/shapely/geos.py", line 56, in load_dll<br>    libname, fallbacks or []))<br>OSError: Could not find lib geos_c or load any of its variants ['/Library/Frameworks/GEOS.framework/Versions/Current/GEOS', '/opt/local/lib/libgeos_c.dylib'].<div><br></div><div>Shapely and the GEOS framework were installed by the QGIS 3.2.1 install.  After further digging, it turns out that `/Library/Frameworks/GEOS.framework/Versions/Current` is a symbolic link to version `3`, but there is no version `3`, just a version `3B`.  The fix was to export the DYLD_LIBRARY_PATH in the shell or add it directly into the script (or alternatively I could have changed the symbolic link):</div><div><br></div>shell - `export DYLD_LIBRARY_PATH=/Library/Frameworks/GEOS.framework/Versions/3B/unix/lib`<div>script - `os.environ['DYLD_LIBRARY_PATH'] = '/Library/Frameworks/GEOS.framework/Versions/3B/unix/lib'`</div><div><br></div><div>DT</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 6, 2018 at 2:47 PM, DT <span dir="ltr"><<a href="mailto:dmofot@gmail.com" target="_blank">dmofot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks William!  All is working now.<div><br></div><div>Chris - here's what is working for me:</div><div><a href="https://gist.github.com/dmofot/94345126db10660053ccfb0d76a1e32a" target="_blank">https://gist.github.com/<wbr>dmofot/<wbr>94345126db10660053ccfb0d76a1e3<wbr>2a</a><br></div><div><br></div><div>and I'm just passing the layers (full path) into the script.  For example, /Users/<user>/Documents/<shp_<wbr>filename.shp></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>DT</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><div class="gmail_quote"><br></div></div></div></div></blockquote></div></div></div></div>