[gdal-dev] Fwd: Missing _gdal_array.py, fail to import in Ubuntu 18.04
Imanol
imanflow at gmail.com
Mon Sep 3 07:47:26 PDT 2018
Hey,
Actually that one is missing. I have { _gdal, _gnm, _gdalconst, _ogr,
_osr}.cpython-36m-x86-linux-gnu.so but no _
gdal_array.cpython-36m-x86-linux-gnu.so.
If there is no _gdal_array.py, why gdal_array.py tries to import it?
How can be missing _gdal_array.cpython-36m-x86-linux-gnu.so if numpy is
installed?
Well, I deleted the folder osgeo, i did make clean and compiled again, but
now i get this error:
ERROR 1: NUMPY driver was compiled against GDAL 2.2, but the current
library version is 2.3
It's getting worse.
El lun., 3 sept. 2018 a las 15:49, Even Rouault (<even.rouault at spatialys.com>)
escribió:
> (please keep the list cc'ed in your replies)
>
> There's no such file as _gdal_array.py. But there should be a file named
> like
> _gdal_array.cpython-36m-x86_64-linux-gnu.so with the native code of the
> binding corresponding to gdal_array.py
> Perhaps try make clean before rebuilding
>
> > Hello Even,
> >
> > It has been always installed, from pip3, I also tried to build it from
> > source.. and still no success. What _gdal_array.py contains that
> > gdal_array.py does not? Is it possible to just copy that file from
> someone
> > who has it?
> >
> > Imanol
> >
> >
> > El lun., 3 sept. 2018 a las 15:17, Even Rouault
> > (<even.rouault at spatialys.com>)
> > escribió:
> > > Imanol,
> > >
> > > it is likely you need also to install the python-numpy package. The
> > > gdal_array.py extension used by ReadAsArray() is only built if numpy is
> > > available when the bindings are built.
> > >
> > > Even
> > >
> > > > Dear all,
> > > >
> > > > I have been struggling with these for some days. Usually I always
> build
> > > > from source GDAL, it tends to give me better results than install
> > >
> > > packages.
> > >
> > > > But this time no, I have tried with `./configure', `./configure
> > > > --with-python' and `./configure --with-python=python3.6'. It seems to
> > > > compile and work, until I do `ReadAsArray()`, when it complains about
> > > > the
> > > > missing `_gdal_array.py`. I tried to compile also numpy from source.
> > > >
> > > > I don't write only to ask for a solution, but also to try to
> understand
> > > > what is this file since I can't find much info about it online.
> > > > `gdal_array,py` exists, but don't know what the missing one contains.
> > > >
> > > > Thank you
> > >
> > > --
> > > Spatialys - Geospatial professional services
> > > http://www.spatialys.com
>
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180903/0548a13c/attachment.html>
More information about the gdal-dev
mailing list