gpt4 book ai didi

Python Geopandas 抛出 "Shell is not a Linear Ring"错误

转载 作者:行者123 更新时间:2023-12-05 07:40:11 25 4
gpt4 key购买 nike

我是 python 的新手,我正在尝试打开一个形状文件,但是当我打开该文件时,当我尝试通过命令行打开它时,我收到一条消息,提示“Shell is not a Linear Ring”。我的代码只有两行,所以我不太确定这里发生了什么......

代码:

import geopandas as gpd

gdp.read_file("tl_2016_17_tract.shp")

错误:

“Shell 不是 LinearRing”

我也试过用 R 和 QGIS 打开形状文件,两者都运行良好。我认为这可能与我安装的 python 有关,因为我之前遇到过一些问题。我在任何地方都找不到对错误“Shell is not a LinearRing”的很好解释!

感谢您的帮助!

最佳答案

有完全相同问题的用户说:

I resolved this issue - I believe it had to do with geopandas and how it was installed. I resolved it by using:

conda remove geopandas

I originally installed via conda-forge channel

and then installing via pip:

pip install geopandas

I also went through and installed some packaged via homebrew, but I am not sure if that made a difference.

Source

关于Python Geopandas 抛出 "Shell is not a Linear Ring"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46392858/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com