Unable to install gdal in python 3.6.1 in macos Sierra

一个人想着一个人 提交于 2019-12-01 06:13:19

I had this error and installing GDAL through Homebrew fixed this for me. Installing the the binaries for GDAL didn't correct the error but once I installed through brew it was resolved.

brew install gdal

seems like the same issue as here: Python GDAL: pip install --no-install GDAL fails

If you've already installed the binaries (like I had) then this answer worked for me: https://stackoverflow.com/a/44051123/3969685

user3799270

This simple procedure seemed to work for me on MAC sierra, python 3.6, GDAL 2.2.3

1) Install GDAL framework using dmg installer for MAC [GDAL MAC Frameworks]: http://www.kyngchaos.com/software/frameworks

2) Add gdal-config folder to your path and get your version:

$ export PATH=/Library/Frameworks/GDAL.framework/Versions/2.2/Programs:$PATH

$ gdal-config --version

3) Use pip to install the version reported by gdal-config --version:

$ pip install gdal==2.2.3

Step 1 Seems to set up the python site-packages under its install framework folders and I think you could copy them to your python site-packages. But better to use pip install.

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