Light Yagmi
Light Yagmi

Reputation: 5235

Python GDAL installation by pip fails

I tried to install python GDAL via pip but getting the following error:

extensions/gdal_wrap.cpp:4265:47: error: use of undeclared identifier 'GDALDatasetCreateLayer'; did you mean 'GDALDatasetShadow_CreateLayer'? OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self, GDALDatasetShadow_CreateLayer

I guessed the reason is the mismatched version of GDAL library, so tried this:

$ brew unlink gdal
$ brew install gdal
$ gdalinfo --version
GDAL 1.11.1, released 2014/09/24

But, still getting the error.

Do I need to install an older version of python GDAL? If so, please let me know which version.

Thanks.

Upvotes: 3

Views: 2973

Answers (1)

kert
kert

Reputation: 2271

As of today, brew has

gdalinfo --version GDAL 1.11.2, released 2015/02/10

Thus, pip install GDAL==1.11.2

Goes just fine. Pypi has 2.0.0 available

Upvotes: 10

Related Questions