[gdal-dev] GDAL 2.4.0 - Import Error with module _gdal_array
Pedro VenĂ¢ncio
pedrongvenancio at gmail.com
Wed Jan 2 04:29:51 PST 2019
Hi,
I'm getting an Import Error "No module named _gdal_array" with GDAL 2.4.0,
that does not happened before, with GDAL <= 2.3.2.
C:\>gdalinfo --version
GDAL 2.4.0, released 2018/12/14
C:\>python
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64
bit (AMD64)] on win32
>>> from osgeo import gdal_array
RuntimeError: module compiled against API version 0xc but this version of
numpy is 0xa
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\OSGEO4~1\apps\Python27\lib\site-packages\osgeo\gdal_array.py",
line 17, in <module>
_gdal_array = swig_import_helper()
File "C:\OSGEO4~1\apps\Python27\lib\site-packages\osgeo\gdal_array.py",
line 16, in swig_import_helper
return importlib.import_module('_gdal_array')
File "C:\OSGEO4~1\apps\Python27\lib\importlib\__init__.py", line 37, in
import_module
__import__(name)
ImportError: No module named _gdal_array
>>> import numpy
>>> numpy.version.version
'1.12.1'
Testing with an old version:
C:\>gdalinfo --version
GDAL 2.2.3, released 2017/11/20
C:\>python
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
on win32
>>> from osgeo import gdal_array
>>> gdal_array
<module 'osgeo.gdal_array' from
'C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\osgeo\gdal_array.py'>
>>> import numpy
>>> numpy.version.version
'1.12.1'
This is happening in a Windows 10 machine, with OSGeo4W 64bits.
Any hint?
Thank you very much!
Best regards,
Pedro VenĂ¢ncio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190102/40a4e1f6/attachment.html>
More information about the gdal-dev
mailing list