![](/img/trans.png)
[英]Error when importing Dash: "ImportError: DLL load failed while importing _brotli: The specified module could not be found."
[英]Fixing "DLL load failed: The specified module could not be found." error in python for importing rasterio
我正在尝试下载 package rasterio
,用于分析地理空间分析学科中 python 中的栅格数据集。
我已经通过来自此地理空间分析二进制文件资源的轮文件下载了光栅的 package 依赖项,包括gdal
、 pyproj
和fiona
: https://www.lfd.uci.edu/~gohlke/pythonlibs/
我通过pip
安装了这些软件包。
然后我通过pip
rasterio
安装rasterio
后,我从Window Command Prompt
收到以下消息: Successfully installed affine-2.3.0 numpy-1.21.4 pyparsing-3.0.6 rasterio-1.2.10 snuggs-1.4.7
。
我想在Jupyter Notebook
中使用这个 package ,所以我打开一个Jupyter Notebook
文件并运行import rasterio
,并收到以下错误消息:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-17-350e27267e59> in <module>
----> 1 import rasterio
~\Anaconda3\lib\site-packages\rasterio\__init__.py in <module>
15 from pathlib import Path
16
---> 17 from rasterio._base import gdal_version
18 from rasterio.drivers import driver_from_extension, is_blacklisted
19 from rasterio.dtypes import (
ImportError: DLL load failed: The specified module could not be found.
如何解决此“DLL 加载失败”问题并解决此错误以便我可以使用rasterio
? 有人告诉我这可能是我的计算机上没有安装Visual C++
的问题,所以我在我的计算机上安装了Visual Studio 2022
,但这并没有帮助。
我通过以下步骤解决了这个问题:
我创造了一个新鲜的环境
我安装了 gdal 库(因为 rasterio 是在它之上构建的),使用以下命令:
conda install -c conda-forge gdal
我使用以下命令安装了 rasterio:
conda install -c conda-forge 光栅
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.