[Gdal-dev] NumPy supported in 1.4.0?
Howard Butler
hobu at iastate.edu
Thu Feb 8 22:21:39 EST 2007
Philip,
It appears that you need to install the numpy header files or GDAL's
setup.py can't find them. Are you using them from a package, or did
you install them yourself with 'python setup.py install'? GDAL's
setup.py attempts to infer the location of the include files by
searching around a little bit. It's possible that this searching
isn't very smart.
Howard
On Feb 8, 2007, at 5:57 PM, Philip Riggs wrote:
> Thank you for your answer, Frank.
> I tried configuring --without-python --with-ngpython and received
> the following errors. How do I fix this?
>
> Philip
>
> cc1plus: warning: command line option "-Wstrict-prototypes" is
> valid for C/ObjC but not for C++
> _gdal_array.cpp: In static member function 'static GDALDataset*
> NUMPYDataset::Open(GDALOpenInfo*)':
> _gdal_array.cpp:319: error: 'NPY_CDOUBLE' was not declared in this
> scope
> _gdal_array.cpp:323: error: 'NPY_CFLOAT' was not declared in this
> scope
> _gdal_array.cpp:327: error: 'NPY_DOUBLE' was not declared in this
> scope
> _gdal_array.cpp:331: error: 'NPY_FLOAT' was not declared in this scope
> _gdal_array.cpp:335: error: 'NPY_INT' was not declared in this scope
> _gdal_array.cpp:336: error: 'NPY_LONG' was not declared in this scope
> _gdal_array.cpp:340: error: 'NPY_UINT' was not declared in this scope
> _gdal_array.cpp:341: error: 'NPY_ULONG' was not declared in this scope
> _gdal_array.cpp:345: error: 'NPY_SHORT' was not declared in this scope
> _gdal_array.cpp:349: error: 'NPY_USHORT' was not declared in this
> scope
> _gdal_array.cpp:353: error: 'NPY_BYTE' was not declared in this scope
> _gdal_array.cpp:354: error: 'NPY_UBYTE' was not declared in this scope
> error: command 'gcc' failed with exit status 1
> make[2]: *** [install] Error 1
> make[1]: *** [install] Error 2
> make: *** [install-actions] Error 2
>
>
> On Feb 8, 2007, at 2:45 AM, Frank Warmerdam wrote:
>
>> Philip Riggs wrote:
>>> I understood from the news release that numpy (not Numeric) was
>>> being supported in 1.4.0. It looks as if only Numeric is being
>>> supported based on gdalnumeric.py in the Python site-packages:
>>> import gdal
>>> import _gdal
>>> from gdalconst import *
>>> from Numeric import *
>>> Can somebody clear this up? Is numpy being supported now, or did
>>> I misunderstand the new release?
>>
>> Philip,
>>
>> I imagine Howard can give a fuller answer if needed, but I believe
>> you
>> are still using the "old" python bindings which are I think still the
>> default in 1.4.0.
>>
>> Try configuring --without-python --with-ngpython. This should build
>> the version in gdal/swig/python which does use numpy instead of
>> Numeric.
>>
>> Best regards,
>> --
>> ---------------------------------------
>> +--------------------------------------
>> I set the clouds in motion - turn up | Frank Warmerdam,
>> warmerdam at pobox.com
>> light and sound - activate the windows | http://pobox.com/~warmerdam
>> and watch the world go round - Rush | President OSGeo, http://
>> osgeo.org
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>
More information about the Gdal-dev
mailing list