geopandas read_file函数导致Importerror
我刚刚得到了一台新计算机,在下载了最新版本的Anaconda发行版后,我尝试安装地理杂质并运行脚本。 但是,GPD.Read_file命令会导致Importerror。 我一直在试图重新安装一切,但没有任何改变。 有人知道如何解决这个问题吗?
import geopandas as gpd
path = "C:/someshapefile.shp"
gpd.read_file(path)
ImportError: The 'read_file' function requires the 'pyogrio' or
'fiona' package, but neither is installed or imports correctly.
进口Fiona导致:
DLL load failed while importing ogrext: The specified module could not be found.
导入Pyogrio导致:
No module named 'pyogrio'
像这样手动安装Fiona:
conda install -c conda-forge fiona
不幸的是对我不起作用。
多谢! 厘米
I just got a new computer and after downloading the newest version of the anaconda distribution I tried to install geopandas and run my script.
However, the gpd.read_file command causes an ImportError.
I have been trying to reinstall everything but nothing changed.
Does anybody know how to figure this out?
import geopandas as gpd
path = "C:/someshapefile.shp"
gpd.read_file(path)
ImportError: The 'read_file' function requires the 'pyogrio' or
'fiona' package, but neither is installed or imports correctly.
Importing fiona resulted in:
DLL load failed while importing ogrext: The specified module could not be found.
Importing pyogrio resulted in:
No module named 'pyogrio'
Just installing fiona manually like this:
conda install -c conda-forge fiona
did unfortunately not work for me.
Thanks a lot!
CM
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题评论
git he> git github.com/toblerity/fiona.git
为我工作
git issue comment
python -m pip install git+https://github.com/Toblerity/Fiona.git
working for me
我正在使用Microforge(基本上是带有Conda-Forge默认值的Microconda)。对我有用的唯一解决方案是创建一个新的环境,将Python版本设置为3.8,然后再次安装所有软件包。
我在此YouTube视频中找到了解决方案: https://wwwww.youtube.com/watch? = XQB4ZITM6K4
我不确定为什么会起作用,但我相信GDAL的较新版本存在问题。
I'm using microforge (basically microconda with conda-forge defaults). The only solution that worked for me was to create a new environment with python version set to 3.8, and then install all packages again.
I found the solution in this youtube video: https://www.youtube.com/watch?v=xqB4ZItm6k4
I'm not exactly sure why this works but I believe there is an issue with newer versions of GDAL.