Matplotlib 在运行cartopy文档中的样本时,如何处理分段错误?

Matplotlib 在运行cartopy文档中的样本时,如何处理分段错误?,matplotlib,cartopy,Matplotlib,Cartopy,运行任何cartopy示例(或使用pyplot和cartopy打印的任何代码)时,系统返回分段错误 我已经尝试了下面列出的解决方案: 当我尝试运行此基本示例时: import cartopy.crs as ccrs import matplotlib.pyplot as plt ax = plt.axes(projection=ccrs.PlateCarree()) ax.coastlines() plt.show() 这是日志: (python:19052): Gtk-WARNING *

运行任何cartopy示例(或使用pyplot和cartopy打印的任何代码)时,系统返回分段错误

我已经尝试了下面列出的解决方案:

当我尝试运行此基本示例时:

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)

我在这个问题上找到了答案:

所以我只需卸载cartopy和shapely,然后使用:

pip install shapely cartopy --no-binary shapely --no-binary cartopy
pip install shapely cartopy --no-binary shapely --no-binary cartopy