Bug#853900: python3-gdal: ImportError on gdal_array module

Sebastiaan Couwenberg sebastic at xs4all.nl
Wed Feb 1 22:10:28 UTC 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python3-gdal_import-gdal_array.patch
Type: inode/symlink
Size: 393 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20170201/dcbac3f4/attachment.bin>


More information about the Pkg-grass-devel mailing list