Shapely: Noisy import on MacOS

Created on 1 Sep 2017  ·  3Comments  ·  Source: Toblerity/Shapely

So importing Shapely 1.6 (from conda-forge) on MacOS (10.12.6) results in:

>python -c 'import shapely.geos'  
Failed `CDLL(/Library/Frameworks/GEOS.framework/Versions/Current/GEOS)`
Failed `CDLL(/opt/local/lib/libgeos_c.dylib)`

I just lost half an hour running down a problem that didn't exist on the basis of those lines. It turns out they're hard-coded alternatives:

https://github.com/Toblerity/Shapely/blob/c25e34f150263fb4c088f13283b56a3b19f31dd3/shapely/geos.py#L109-L115

so there's really no reason that a warning (certainly not one that's visible by default) should be issued when not finding these ones.

bug

All 3 comments

@dopplershift I agree thatlog.warn() is too strong. I'll make it log.debug().

Thanks @sgillies. I got tons of people complain about the conda package when the update landed on the channel.

Also thanks for making it easier to use shapely with conda! We no longer need to patch it to find the correct libs.

Done. 1.6.1 is up on PyPI, too.

Was this page helpful?
0 / 5 - 0 ratings