Monday 20 May 2019

Python GDAL package missing header file when installing via pip


I asked this question on Stack Overflow before I realised this site existed. As this site it more appropriate, I'll ask it here too.


I'm trying to install gdal from pip pip install gdal inside a virtual environment (Ubuntu). It fails because it cannot find cpl_port.h


extensions/gdal_wrap.cpp:2853:22: fatal error: cpl_port.h: No such file or directory

compilation terminated

However GDAL is installed correctly and the header file is located at /usr/include/gdal/cpl_port.h. Is there some environment variable for GDAL that needs to be set in order for pip to find the header files?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...