0

I downloaded the GDAL complete Framework von Kyngchaos which also includes the GEOS Framework and shapely for python.

I can import shapely without a problem, but when I try to perform some "geo related" operations (like shape()) I get this error message:

Failed CDLL(/opt/local/lib/libgeos_c.dylib)

This is my echo $PATH output:

/Library/Frameworks/GDAL.framework/Programs:
/Library/Frameworks/Python.framework/Versions/3.3/bin:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:
/Library/TeX/texbin:/Library/Frameworks/GEOS.framework/:
/Library/Frameworks/GEOS.framework/Versions/3/unix/lib/:
/Library/Frameworks/GEOS.framework/Versions/3/unix/:
/Library/Frameworks/GEOS.framework/Versions/3/unix/bin

I checked, the GEOS framework is in there. Any ideas why shapely is not wirking?

  • For what it is worth, and if you have the option, it is quite painless to use the Anaconda python distribution version of shapely. – songololo Apr 20 '16 at 20:15
2

You have to point your system to where the GEOS Framework is located. See this post:

DYLD_LIBRARY_PATH="/Library/Frameworks/GEOS.framework/Versions/3/unix/lib"
export DYLD_LIBRARY_PATH

If it works, add it to your $PATH!

|improve this answer|||||
1

The Shapely distributions I am making for OS X (https://pypi.python.org/pypi/Shapely#downloads) have GEOS included and you won't have to think about library paths at all. If you're using Python 2.7, 3.4, or 3.5 and OS X 10.6+, pip install shapely is the best way to get it.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.