[gdal-dev] gdal_array not found in Python
gyetman at ciesin.columbia.edu
Mon May 9 16:05:51 EDT 2011
Thanks for the info. I do have numpy installed and working:
>>> import numpy
>>> print numpy.version.version
On 5/9/2011 3:58 PM, Even Rouault wrote:
> Le lundi 09 mai 2011 21:51:44, Gregory Yetman a écrit :
>> I've installed GDAL 1.8 and have it (mostly) working with Python 2.7.1.
>> I can import all modules from osgeo except gdal_array. There is a
>> gdal_array.py file in the site-packages directory with the other modules.
>> I'm using the binaries (for windows) from here:
> I've looked at the ZIP file and I believe the package has been built without
> numpy support. (I'd expect a bin/gdal/python/osgeo/_gdal_array.pyd)
> CC'ing Tamas to let him know.
>> I get the error message below only when I try and import gdal_array:
>> >>> from osgeo import gdal_array
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in<module>
>> File "C:\Python27\lib\site-packages\osgeo\gdal_array.py", line 24, in
>> _gdal_array = swig_import_helper()
>> File "C:\Python27\lib\site-packages\osgeo\gdal_array.py", line 16, in
>> import _gdal_array
>> ImportError: No module named _gdal_array
>> I have numpy installed, not sure if that's a requirement or not. Any
>> suggestions would be appreciated!
> numpy is a requirement at runtime if you load the gdal_array module.
CIESIN, Columbia University
More information about the gdal-dev