在Google Colab上使用Cartopy:每次都崩溃

问题描述 投票:-1回答:1

仅运行下面的代码块每次都会使我的Colab Notebook的运行时崩溃。特别是通过Cartopy调用ax.coastlines()时发生。有人知道这个问题的解释/解决方法吗?

!apt-get -qq install python-cartopy python3-cartopy
import cartopy
import matplotlib.pyplot as plt
# Draw coastlines of the Earth
ax = plt.axes(projection=cartopy.crs.PlateCarree())
ax.coastlines()
python google-colaboratory cartopy
1个回答
0
投票

运行时日志显示问题:

python3: geos_ts_c.cpp:3991: int GEOSCoordSeq_getSize_r(GEOSContextHandle_t, const geos::geom::CoordinateSequence*, unsigned int*): Assertion `0 != cs' failed.

在线搜索指向此GitHub问题:

cartopy possibly kills the kernel when using ipython/jupyter notebook

我将从那里的建议开始。但是,这似乎是cartopy及其部门的图书馆问题。

© www.soinside.com 2019 - 2024. All rights reserved.