[gdal-dev] Help with import gdal import in python

Frank Warmerdam warmerdam at pobox.com
Wed Feb 9 11:40:38 EST 2011


On 11-02-09 11:23 AM, Giacomo Piva wrote:
> Hi all,
>
> I'm getting this error when calling gdal_merge.py command.
>
> Traceback (most recent call last):
> File "/home/meeo/bin/gdal_merge.py", line 31, in ?
> import gdal
> File "/usr/lib/python2.4/gdal.py", line 7, in ?
> import _gdal
> ImportError: No module named _gdal
>
> I don't know python 'cause I don't know how to solve this problem.
> Any suggestion?

Giacomo,

With all due respect you haven't given much context.   Did you build
and install GDAL and the python bindings yourself?

I imagine the problem is related either to the _gdal.so file not being
found, or it not loading because the underlying libgdal.so.* file not
being found.  Does _gdal.so exist in:

   /usr/lib/python2.4/osgeo

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list