Re: [gdal-dev] can't import osgeo or gdal in python

Ivan Lucena ivan.lucena at pmldnet.com
Mon Sep 20 22:37:32 EDT 2010


I got some good news!

It is working pretty good. See:

Last login: Mon Sep 20 19:08:28 on ttys002
turtlebowl:~ ilucena$ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from osgeo import gdal
>>> drv = gdal.GetDriverByName("GTIFF")
>>> print drv.GetDescription()
GTiff
>>> 

In my case, I install Python 2.7 so it was easier to notice that I was not running Apples's installation of Python 2.6.

Anyway, the instruction are relatively accurate at issue7107 but basically, all you need to do is that:

ln -s /usr/bin/python2.6 /usr/bin/python

Note that running "make generate; setup.py build; setup.py install" with Apple's Python is a little bit scarier now, full of 
warning but it works.

Regards,

Ivan

>  -------Original Message-------
>  From: Ivan Lucena <ivan.lucena at pmldnet.com>
>  To: William Kyngesburye <kyngchaos at kyngchaos.com>
>  Cc: gdal-dev <gdal-dev at lists.osgeo.org>
>  Subject: Re: [gdal-dev] can't import osgeo or gdal in python
>  Sent: Sep 20 '10 20:43
>  
>  Well, I am following other lead.
>  
>  I am trying to uninstall the python.org 2.7 and use only the 2.6 from Apple that is actually working well with GDAL.
>  
>  I did some search and found that tip on python bug report issue7107 on how to uninstall python from OS X:
>  
>  http://bugs.python.org/issue7107
>  
>  Regards,
>  
>  Ivan
>  
>  >  -------Original Message-------
>  >  From: William Kyngesburye <woklist at kyngchaos.com>
>  >  To: Ivan Lucena <ivan.lucena at pmldnet.com>
>  >  Cc: gdal-dev <gdal-dev at lists.osgeo.org>
>  >  Subject: Re: [gdal-dev] can't import osgeo or gdal in python
>  >  Sent: Sep 20 '10 19:54
>  >  
>  >  For both of you, it now sounds like the _gdal.so might not be linking libgdal at all.
>  >  
>  >  What does this return:
>  >  
>  >  otool -L /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osgeo/_gdal.so
>  >  
>  
>  _______________________________________________
>  gdal-dev mailing list
>  gdal-dev at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  


More information about the gdal-dev mailing list