Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

trouble installing Fiona in python cpl_error.h: No such file or directory

I have tried to install geopandas two different ways: pip install geopandas or by cloning

git clone https://github.com/kjordahl/geopandas

In both cases, the installation file setup.py runs for a while and then returns this error message:

src/fiona/ogrinit.c:300:23: fatal error: cpl_error.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

fiona is interface to OGR so Python can read geospatial data. cpl_error.h seems to be missing. What can I do?

like image 873
john mangual Avatar asked Oct 20 '22 20:10

john mangual


1 Answers

try installing gdal binaries with:

sudo pip install libgdal-dev

and fiona later on:

sudo pip install fiona
like image 124
user1632928 Avatar answered Nov 15 '22 06:11

user1632928