Python - pip install - 错误:必须指定 GDAL API 版本 [英] Python - pip install - ERROR: A GDAL API version must be specified

查看:535
本文介绍了Python - pip install - 错误:必须指定 GDAL API 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试根据上下文安装模块以在 Python 上使用它.

I try to install the module contextily to use it on Python.

我以管理员身份继续使用 Anaconda Prompt,并写道:pip install contextily

I went on Anaconda Prompt as admin, and wrote : pip install contextily

我收到这个错误,但我仍然没有找到我必须做的事情:

I get this error and I have still not found what I have to do :

获取构建轮子的要求...错误
错误:命令出错,退出状态为 1:
命令:'C:\Users\elise\AppData\Local\Continuum\anaconda3\python.exe''C:\Users\elise\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py'get_requires_for_build_wheel'C:\Users\elise\AppData\Local\Temp\tmpwkajt8gq'cwd: C:\Users\elise\AppData\Local\Temp\pip-install-ysq517b2\rasterio
完整输出(2 行):
INFO:root:Building on Windows 需要 setup.py 的额外选项来定位所需的 GDAL 文件.更多的信息可在自述文件中找到.
错误:必须指定 GDAL API 版本.使用 GDAL_CONFIG 提供 gdal-config 的路径

Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command:'C:\Users\elise\AppData\Local\Continuum\anaconda3\python.exe' 'C:\Users\elise\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\elise\AppData\Local\Temp\tmpwkajt8gq' cwd: C:\Users\elise\AppData\Local\Temp\pip-install-ysq517b2\rasterio
Complete output (2 lines):
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

错误:命令出错,退出状态为 1:'C:\Users\elise\AppData\Local\Continuum\anaconda3\python.exe''C:\Users\elise\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py'get_requires_for_build_wheel'C:\Users\elise\AppData\Local\Temp\tmpwkajt8gq' 检查日志以获取完整的命令输出.

ERROR: Command errored out with exit status 1: 'C:\Users\elise\AppData\Local\Continuum\anaconda3\python.exe' 'C:\Users\elise\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\elise\AppData\Local\Temp\tmpwkajt8gq' Check the logs for full command output.

(我试图像那里那样处理环境变量:没有名为 ogr 的模块 但它没有帮助.这些解决方案都没有:安装 geopandas 时出错:必须在 Anaconda 中指定 GDAL API 版本")

(I tried to deal with environment variable like there : No module named ogr but it doesn't help. Neither these solutions : Error installing geopandas:" A GDAL API version must be specified " in Anaconda)

推荐答案

作为一个 Python 初学者,我遇到了同样的错误但是 https://anaconda.org/conda-forge/contextily 和 conda install -c conda-forge 在上下文中为我工作.

As a python beginner I ran in the same error but https://anaconda.org/conda-forge/contextily and conda install -c conda-forge contextily worked for me.

这篇关于Python - pip install - 错误:必须指定 GDAL API 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆