我在windows10上工作,在anaconda提示符下执行pip install rasterio时遇到一个错误。
(base) C:\Users\skywalker>pip install rasterio
Collecting rasterio
Using cached https://files.pythonhosted.org/packages/57/84/be5689470a73f5f8988cf44b81cb3493ebb8abbbebb69768c8fc86fccdd5/rasterio-1.0.24.tar.gz
Complete output from command python setup.py egg_info:
INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. More information is available in the README.
ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SKYWAL~1\AppData\Local\Temp\pip-install-iyhe142u\rasterio\发布于 2020-07-22 00:18:25
如果您使用的是anaconda,则可以执行以下操作:
conda install -c conda-forge <package-name>在我看来,在windows上使用anaconda总是更好的。
发布于 2021-04-22 00:12:40
我通过以下步骤解决了这个问题:
pip install -U pip
pip install GDAL-1.11.2-cp27-none-win32.whl
pip install rasterio-0.24.0-cp27-none-win32.whl在official docs中找到
https://stackoverflow.com/questions/56962959
复制相似问题