[gdal-dev] gdal_array not found in Python
even.rouault at mines-paris.org
Mon May 9 15:58:34 EDT 2011
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.
More information about the gdal-dev