【发布时间】:2020-07-23 02:20:35
【问题描述】:
我正在尝试在 heroku 上推送我的 django 应用程序,但我不断收到此消息错误。
An error occurred while installing gdal==3.1.2! Will try again.
remote: Installing initially–failed dependencies…
remote: Collecting gdal==3.1.2
...和
Traceback (most recent call last):
remote: File "/tmp/pip-build-oj843jp_/gdal/setup.py", line 257, in get_gdal_config
remote: return fetch_config(option)
remote: File "/tmp/pip-build-oj843jp_/gdal/setup.py", line 154, in fetch_config
remote: raise gdal_config_error(e)
remote: gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
remote:
remote: Could not find gdal-config. Make sure you have installed the GDAL native library and development headers.
我认为这是因为我更新了 GDAL,因为之前的错误消息似乎 django 只支持 2.4 版。
我下载了 2.4.3 版本的文件,但找不到安装它的命令。 我试过 pip install gdal==2.4.3 还是不行。
我无法通过正确的步骤来获得正确的版本。谁能指出我正确的方向? 我正在使用 mac catalina
【问题讨论】:
-
像你一样用 pip 指定版本是正确的做法。你得到什么错误?也可以使用
pip -e在本地安装您下载的文件 -
我在终端上收到了一些红色消息。害怕!! .错误:为 gdal 构建轮子失败为 gdal 运行 setup.py clean 无法构建 gdal 安装收集的包:gdal 尝试卸载:gdal 找到现有安装:GDAL 3.1.2 卸载 GDAL-3.1.2:成功卸载 GDAL-3.1.2 运行setup.py install for gdal ... error ERROR: Command errored out with exit status 1:
-
不幸的是,有趣的部分就在您停止粘贴的位置,在“退出状态为 1:”之后。牛米,它是
No such file or directory: 'gdal-config'。所以你没有安装libgdal-dev。
标签: python django installation geospatial gdal