使用conda或pip install导入模块(rasterio)失败(Import module (rasterio) fail with conda or pip install)

编程入门 行业动态 更新时间:2024-10-26 03:26:18
使用conda或pip install导入模块(rasterio)失败(Import module (rasterio) fail with conda or pip install) python

我正在尝试将rasterio安装到我的python环境中,并且遇到以下错误。 我可以

conda install rasterio

安装时没有出现错误,但是当我尝试导入时出现以下错误

from rasterio._base import eval_window, window_shape, window_index ImportError: DLL load failed: The specified module could not be found.

如果我试试

pip install rasterio

使用此安装时出错:

rasterio/_base.c(263) : fatal error C1083: Cannot open include file:'cpl_conv.h': No such file or directory error: command 'C:\\Users\\Rdebbout\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2 ---------------------------------------- Failed building wheel for rasterio

尝试导入fiona模块时遇到同样的问题。 DLL加载的方式和/或位置是什么? 我对这个问题一无所知,并希望对如何解决这个问题有任何帮助或指导。

我在Windows 7上使用64位版本的spyder。

I am trying to install rasterio into my python environment and am getting the following errors. I can do

conda install rasterio

No error comes up on the install but I come up with the following error when I try to import

from rasterio._base import eval_window, window_shape, window_index ImportError: DLL load failed: The specified module could not be found.

if I try

pip install rasterio

it errors when installing with this:

rasterio/_base.c(263) : fatal error C1083: Cannot open include file:'cpl_conv.h': No such file or directory error: command 'C:\\Users\\Rdebbout\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2 ---------------------------------------- Failed building wheel for rasterio

I have the same problems with trying to import the fiona module. How and/or where do DLLs get loaded? I'm in the dark on this one and would appreciate any help or direction as to how to troubleshoot this problem.

I am using the 64-bit version of spyder on windows 7.

最满意答案

我建议尝试ioos anaconda配方( https://anaconda.org/ioos/rasterio )。

conda install -c https://conda.anaconda.org/ioos rasterio 。

我尝试使用标准anaconda版本安装更新版本的rasterio时遇到了同样的DLL问题。

I would suggest trying the ioos anaconda recipe (https://anaconda.org/ioos/rasterio).

conda install -c https://conda.anaconda.org/ioos rasterio.

I have run into the same DLL issue you are seeing when trying to install more recent versions of rasterio using the standard anaconda version.

更多推荐

本文发布于:2023-04-27 13:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1327129.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   install   pip   conda   fail

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!