[gdal-dev] python gdal problem

Howard Butler hobu.inc at gmail.com
Tue Dec 29 09:30:07 EST 2009


Edit setup.cfg in swig/python to point to the location of your gdal-config script.  Alternatively, you could edit your PATH environment variable to have /usr/local/bin on it, and setup should find it.  

Howard

On Dec 29, 2009, at 8:29 AM, Leonardo Hardtke wrote:

> Hi all,
> I've been using Python-gdal bindings in Ubuntu 9.04 without problems.
> Recently I made a fresh Ubuntu 9.10 install and I can't install the bindings on it...
> 
> leo at rs7 ~/Descargas/GDAL-1.6.1 $ python setup.py build
> numpy include /usr/lib/python2.6/dist-packages/numpy/core/include
> setup.py:78: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
>   import popen2
> running build
> running build_py
> creating build
> creating build/lib.linux-x86_64-2.6
> copying gdal.py -> build/lib.linux-x86_64-2.6
> copying ogr.py -> build/lib.linux-x86_64-2.6
> copying osr.py -> build/lib.linux-x86_64-2.6
> copying gdalconst.py -> build/lib.linux-x86_64-2.6
> copying gdalnumeric.py -> build/lib.linux-x86_64-2.6
> creating build/lib.linux-x86_64-2.6/osgeo
> copying osgeo/gdal.py -> build/lib.linux-x86_64-2.6/osgeo
> copying osgeo/osr.py -> build/lib.linux-x86_64-2.6/osgeo
> copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.6/osgeo
> copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.6/osgeo
> copying osgeo/__init__.py -> build/lib.linux-x86_64-2.6/osgeo
> copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.6/osgeo
> copying osgeo/ogr.py -> build/lib.linux-x86_64-2.6/osgeo
> running build_ext
> Could not run gdal-config!!!!
> building 'osgeo._gdal' extension
> creating build/temp.linux-x86_64-2.6
> creating build/temp.linux-x86_64-2.6/extensions
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/include/python2.6 -I/usr/lib/python2.6/dist-packages/numpy/core/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.6/extensions/gdal_wrap.o
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
> extensions/gdal_wrap.cpp:129:20: error: Python.h: No existe el fichero ó directorio
> extensions/gdal_wrap.cpp:2502:4: error: #error "This python version requires swig to be run with the '-classic' option"
> extensions/gdal_wrap.cpp:2587:22: error: cpl_port.h: No existe el fichero ó directorio
> extensions/gdal_wrap.cpp:2588:24: error: cpl_string.h: No existe el fichero ó directorio
> extensions/gdal_wrap.cpp:2590:18: error: gdal.h: No existe el fichero ó directorio
> extensions/gdal_wrap.cpp:2591:23: error: gdal_priv.h: No existe el fichero ó directorio
> extensions/gdal_wrap.cpp:2592:22: error: gdal_alg.h: No existe el fichero ó directorio
> extensions/gdal_wrap.cpp:2593:24: error: gdalwarper.h: No existe el fichero ó directorio
> extensions/gdal_wrap.cpp:734: error: expected initializer before ‘*’ token
> extensions/gdal_wrap.cpp:789: error: expected initializer before ‘*’ token
> extensions/gdal_wrap.cpp:810: error: expected initializer before ‘*’ token
> In file included from /usr/include/c++/4.4/stdexcept:38,
>                  from extensions/gdal_wrap.cpp:2521:
> /usr/include/c++/4.4/exception:35: error: expected declaration before end of line
> error: command 'gcc' failed with exit status 1
> 
> the problem is with gdal-config (it is installed on /usr/local/bin), but I don't now how to fix it!
> 
> Tanks in advise
> -- 
> Lic. Leonardo A. Hardtke   
> Laboratorio de Teledetección y S.I.G.  
> Centro Nacional Patagónico (CONICET) 
> Bvd. Brown 2825, 9120 
> Puerto Madryn, Chubut, Argentina 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list