安装“ libspatialIndex-dev”在jupyter上
我正在尝试使用geopandas进行内部空间连接,其中点
和 poly
都是geodataframes。
instersection = gpd.sjoin(points, poly, how='inner')
但是,它引发了以下错误的错误
空间索引要求`rtree'或`Pygeos`
我知道这是因为没有安装 libspatialIndex-dev
(请参阅 libspatialIndex和rtree in python ),但是 sudo apt apt apt Install ...
。
我如何在jupyter笔记本上安装它?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是Google COLAB笔记本,您可以找到此链接有用:
我运行了上述笔记本,并能够成功安装rtree。
虽然这也可能很有帮助:
在您的jupyter单元格上运行以下内容:
If you are using Google Colab notebook you can find this link to be helpful:
https://colab.research.google.com/drive/1N7i9zmOwVcUzd4eHWZux4p_WTBMZHi8C
I ran the above notebook and was able to successfully install rtree.
While this may be helpful as well:
On your Jupyter cell run this: