[Gdal-dev] Python C API version mismatch

John Cartwright John.C.Cartwright at noaa.gov
Tue Apr 4 15:59:43 EDT 2006


Thanks Sean, that helps.  Seems like my underlying problem is that 
configure is picking up the first python executable in my path (the 
older 2.2.3).  I don't see a way to specify the python executable to 
use, do you know a better solution other than mainipulating my 
environment for the configure/build process?

-- john


Sean Gillies wrote:

>
> On Apr 4, 2006, at 9:09 AM, John Cartwright wrote:
>
>> Hello All,
>>
>> Can someone tell me what I might have done wrong in compiling gdal  
>> 1.3.1 on linux? I get the following error upon importing the gdal  
>> module:
>>
>> /data1/contrib/lib/python2.4/gdal.py:191: RuntimeWarning: Python C  
>> API version mismatch for module _gdal: This Python has API version  
>> 1012, module _gdal has version1011.
>>
>> I'm using python2.4.2, and these are my configure options:
>>
>> ./configure --prefix=/data1/contrib/gdal-1.3.1 \
>> --with-png=internal \
>> --with-libtiff=internal --with-geotiff=internal \
>> --with-libz=internal --with-jpeg=internal --with-gif=internal \
>> --with-pg=/usr/bin/pg_config \
>> --with-mysql=/usr/bin/mysql_config \
>> --with-oci=/usr/lib/oracle/10.2.0.1/client \
>> --with-geos=/data1/contrib/geos-2.2.1/bin/geos-config \
>> --with-pymoddir=/data1/contrib/lib/python2.4
>>
>> Thanks!
>>
>> -- john
>
>
> John,
>
> Is it possible that your pymoddir is not on your Python path, and  
> that you're importing an older gdal.py?
>
> I think your configure should probably have
>
>   --with-pymoddir=/data1/contrib/lib/python2.4/site-packages
>
> just for the sake of keeping site-packages like gdal in the right place.
>
> Sean
>
> ---
> Sean Gillies
> http://zcologia.com
>
>
>
>



More information about the Gdal-dev mailing list