On 02/01/2017 10:21 PM, Sebastiaan Couwenberg wrote: > On 02/01/2017 09:50 PM, Teemu Ikonen wrote: >> Trying to import osgeo.gdal_array module results in this: >> >> $ python3 -c "import osgeo.gdal_array" >> Traceback (most recent call last): >> File "<string>", line 1, in <module> >> File "/usr/lib/python3/dist-packages/osgeo/gdal_array.py", line 168, >> in <module> >> import _gdal_array >> ImportError: No module named '_gdal_array' > > _gdal_array.cpython-35m-x86_64-linux-gnu.so exists and should be loaded, > but for some reason it's not. The other modules load fine though. > > I'm a bit at a loss what's going wrong here. For now you should stick to > the Python 2 module with doesn't have this issue.
With the changes from the attached patch I managed to fix the import error. Since the gdal_array.py file is generated by SWIG, it looks like a deficiency there. I'm not quite sure how we can fix that properly. Kind Regards, Bas -- GPG Key ID: 4096R/6750F10AE88D4AF1 Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
python3-gdal_import-gdal_array.patch
Description: inode/symlink