gem / oq-builders

Installers for the OpenQuake suite
GNU Affero General Public License v3.0
0 stars 0 forks source link

Cartopy and Basemap wheels are broken on macOS #99

Open daniviga opened 6 years ago

daniviga commented 6 years ago

It complains about libgeos and goes into segfault

To reproduce:

pip install http://ftp.openquake.org/wheelhouse/macos/py35/Shapely-1.6.4.post1-cp35-cp35m-macosx_10_9_intel.macosx_10_9_x86_64.whl
pip install http://ftp.openquake.org/wheelhouse/macos/py35/matplotlib-2.1.2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
pip install http://cdn.ftp.openquake.net/wheelhouse/macos/py35/Cartopy-0.16.0-cp35-cp35m-macosx_10_6_intel.whl
import cartopy.crs as ccrs
import matplotlib.pyplot as plt

ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines()

plt.show()
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap as Basemap

llon, ulon, llat, ulat = (94.0000,142.0000, -11.986, 8.0000)
m = Basemap(llon,llat,ulon,ulat,projection='merc')
daniviga commented 6 years ago

That's a DLL hell:

https://github.com/SciTools/cartopy/issues/805 https://github.com/SciTools/cartopy/issues/738 https://github.com/Toblerity/Shapely/issues/416 https://github.com/Toblerity/Shapely/issues/553

Shapely is altering libgeos' symbols on the fly causing segfaults when another code is loading the original library.