On 2017-06-05 I began to use GDAL 2.2.0
in the Fiona binary wheels I upload to the Cheeseshop. I also changed the
MACOSX_DEPLOYMENT_TARGET environment variable from 10.6 to 10.9 in order to
get GDAL 2.2.0 to compile. This seems to be the cause of Shapely and Fiona
wheel compatibility issues. Have I mentioned that I'm not completely competent
at C++ on OS X? I'm not.
My co-worker Matt Perry provided a script that exposed this issue clearly and
I bisected in Fiona and Shapely version space until I found the root of the
problem.
Until I get new wheels on PyPI, here are the three coping strategies.
- Avoid the wheels entirely:
pip install -I --no-binary fiona,shapely fiona==1.7.10 shapely==1.6.2
This is what I do in my Dockerfiles at work. This strategy requires the GDAL
and GEOS libraries and headers to be pre-installed on your system, and also
Numpy and Cython.
- Downgrade Fiona, using wheels:
pip install -I fiona==1.7.6
- Downgrade Shapely, using wheels:
pip install -I shapely==1.6b4
The issue affects Rasterio, too. Rasterio version 1.0a9 wheels should be safe
with any version of Shapely.
I'll have an announcement about new wheels soon.
Update (2017-10-31): the nightmare is over.