【发布时间】:2018-02-18 23:17:55
【问题描述】:
我可以使用 pip 在我的 mac 上为 python2.7 pip 安装 GDAL。但是,当我尝试使用为我的 python3.6 安装包时
pip3 install gdal 我收到一条很长的错误消息,并以此结尾:
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
extensions/gdal_wrap.cpp:3168:10: fatal error: 'cpl_port.h' file not found
#include "cpl_port.h"
^~~~~~~~~~~~
1 warning and 1 error generated.
error: command 'clang' failed with exit status 1
我尝试按照这里的建议使用自制软件重新安装 GDAL,Unable to install GDAL in python 3 using pip (clang failed with exit status 1),但没有运气。寻找任何建议。
【问题讨论】:
-
您的系统上当前是否有 GDAL?
ogrinfo --version报告的是什么版本?我遇到了类似的问题,使用自制软件将 gdal 升级到 2.2.4 后,我的问题得到了解决。 -
感谢您回复此问题,我实际上从未弄清楚。我确实安装了 GDAL 2.1.3 版
标签: python python-3.x macos gdal