[gdal-dev] Gdal 1.7.1 and Python3.1

Even Rouault even.rouault at mines-paris.org
Sun Feb 21 17:12:42 EST 2010


Thomas,

you can't use the python package compiled with a python version with another 
python version.

So try the following :

cd /path/to/gdal_source_tree/swig/python
sudo /path/to/your/python3.1/bin/python setup.py install

Le Sunday 21 February 2010 23:00:24 Thomas Maschler, vous avez écrit :
> Hi,
>
> I am trying to get Gdal 1.7.1 running with Python3.1 since I was reading
> that this is possible now, but somehow it does not work.
>
> I am using Ubuntu 9.10 having, python2.6 and python3.1 installed.
>
> I compiled gdal from source. The packages were placed in the 2.6 folder and
> gdal runs fine in the version
>
> >>> from osgeo import gdal
> >>> gdal.__version__
>
> '1.7.1'
>
> Since I want it to use in 3.1, I copied the packages into my 3.1 folder (was 
this right??) and got the error:
> >>> from osgeo import gdal
>
> Traceback (most recent call last):
>   File "<pyshell#8>", line 1, in <module>
>     from osgeo import gdal
>   File "/usr/local/lib/python3.1/dist-packages/osgeo/__init__.py", line 21,
> in <module> _gdal = swig_import_helper()
>   File "/usr/local/lib/python3.1/dist-packages/osgeo/__init__.py", line 17,
> in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname,
> description)
> ImportError: /usr/local/lib/python3.1/dist-packages/osgeo/_gdal.so:
> undefined symbol: PyInstance_Type
>
>
>
> Can anybody help?
>
> Thanks in advance
>
> Thomas
>
>
> --
> NEU: Mit GMX DSL über 1000,- ¿ sparen!
> http://portal.gmx.net/de/go/dsl02
>
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01




More information about the gdal-dev mailing list