Mac:尝试用Python调用osgeo时为什么会出错?

时间:2019-04-19 09:55:08

标签: python gdal osgeo

我尝试从ogr导入osgeo

from osgeo import ogr

但出现以下错误

ModuleNotFoundError: No module named 'osgeo'

在安装GDAL之前,如果我这样做:

pip3 install gdal
Requirement already satisfied: gdal in /usr/local/lib/python3.7/site-packages (2.4.0)

1 个答案:

答案 0 :(得分:0)

在运行pip3 install gdal之前,请尝试安装the complete GDAL package for Mac from this site