Encountered a error while pip install rasterio

落花浮王杯 提交于 2021-02-19 01:48:08

问题


I am working on windows 10 and encountered an error while executing pip install rasterio in anaconda prompt.

(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\

回答1:


If you are using anaconda, you can do :

conda install -c conda-forge <package-name>

In my opinion, it is always better to use anaconda on windows.



来源:https://stackoverflow.com/questions/56962959/encountered-a-error-while-pip-install-rasterio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!