I was wondering how to build the gdal python binding from source using MinGW. In particular, I need to install python utility scripts such as
I've searched around and found this question about Installing GDAL with Python on windows?, but it was about installing gdal binaries. I need to compile from source because I have other libraries in my MinGW/MSYS.
So far, I have downloaded gdal-1.11.2.tar.gz, and I did:
./configure --with-python=/c/Python27/ArcGIS10.2/python.exe make && make install
/c/Python27/ArcGIS10.2/python.exe above is the python binary from ArcGIS 10.2. I also followed http://trac.osgeo.org/gdal/wiki/BuildingWithMinGW to edit
But I cannot get past the last step
make install. After
make, I have
./swig/python/scripts/gdal_calc.py in the make folder, but
gdal_calc.py is not installed to the msys folder with
I was wondering if anyone can suggest the right way to compile from source here?
The error message I got during
make install was:
make: Entering directory `/c/temp/src/gdal-1.11.2/swig' for dir in python ; do (cd $dir; make install) || exit; done make: Entering directory `/c/temp/src/gdal-1.11.2/swig/python' /c/Python27/ArcGIS10.2/python.exe setup.py install --prefix=/usr/local running install running build running build_py running build_ext Traceback (most recent call last): File "setup.py", line 320, in <module> ext_modules = ext_modules ) File "c:\Python27\ArcGIS10.2\lib\distutils\core.py", line 152, in setup dist.run_commands() File "c:\Python27\ArcGIS10.2\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) ... File "setup.py", line 176, in get_gdal_config return fetch_config(option) File "setup.py", line 129, in fetch_config raise gdal_config_error, e""") File "<string>", line 4, in <module> __main__.gdal_config_error: [Error 2] The system cannot find the file specified make: *** [install] Error 1 make: Leaving directory `/c/temp/src/gdal-1.11.2/swig/python' make: *** [install] Error 2 make: Leaving directory `/c/temp/src/gdal-1.11.2/swig' make: *** [install-actions] Error 2