在运行任何cartopy示例(或使用pyplot和cartopy进行绘图的任何代码)时,系统返回细分错误
我已经尝试过此处列出的解决方案:Cartopy examples produce a Segmentation fault
pip uninstall shapely
pip install --no-binary :all: shapely
当我尝试运行此基本示例时:
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines()
plt.show()
这是日志:
(python:19052): Gtk-WARNING **: 21:40:45.891: Theme parsing error: gtk.css:11546:3: '/*' in comment block
(python:19052): Gtk-WARNING **: 21:40:45.891: Theme parsing error: gtk.css:11652:2: '/*' in comment block
Segmentation fault (core dumped)
答案 0 :(得分:1)
我在此问题中找到了答案:https://github.com/SciTools/cartopy/issues/738
所以我只需要卸载cartopy和shapely,然后使用:
pip install shapely cartopy --no-binary shapely --no-binary cartopy