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

Giacomo Piva piva at meeo.it
Thu Feb 10 02:46:37 EST 2011


Frank,
Thanks for your reply, I solved my problem by recompiling GDAL with 
--with-python option.
Thanks.

On 02/09/2011 05:40 PM, Frank Warmerdam wrote:
> 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,


-- 
Giacomo Piva

MEEO S.r.l.
Via Saragat 9
I-44122 Ferrara, Italy
Tel: +39 0532 1861501
Fax: +39 0532 1861637
http://www.meeo.it

========================================
"ATTENZIONE:le informazioni contenute in questo messaggio sono
da considerarsi confidenziali ed il loro utilizzo è riservato unicamente
al destinatario sopra indicato. Chi dovesse ricevere questo messaggio
per errore è tenuto ad informare il mittente ed a rimuoverlo
definitivamente da ogni supporto elettronico o cartaceo."

"WARNING:This message contains confidential and/or proprietary
information which may be subject to privilege or immunity and which
is intended for use of its addressee only. Should you receive this
message in error, you are kindly requested to inform the sender and
to definitively remove it from any paper or electronic format."



More information about the gdal-dev mailing list