[gdal-dev] Path problem with gdal2tiles on Mac

Christopher Schmidt crschmidt at metacarta.com
Fri Sep 11 19:27:02 EDT 2009


On Fri, Sep 11, 2009 at 03:57:11PM -0700, Mano Marks wrote:
> Using gdal2tiles on the mac, I get an ImportError for gdal:
> 
> Traceback (most recent call last):
>   File "/Library/Frameworks/GDAL.framework/Programs/gdal2tiles.py",
> line 42, in ?
>     import gdal
> ImportError: No module named gdal
> 
> Any suggestions? I tried mucking around with paths, no luck so far.

Using KyngChaos binaries, on a new laptop I just got today, I can do this:

PYTHONPATH="/Library/Frameworks/GDAL.framework/Versions/1.6/Python/site-packages/" python /Library/Frameworks/GDAL.framework/Programs/gdal2tiles.py

(This is on Snow Leopard; Tiger and older will need to install Python2.5
from python.org.)

> I understand that maptiler is the replacement, but it's been in alpha
> for awhile and I'd like to create samples for people who are not
> willing to use alpha software.

MapTiler isn't really a replacement, just a graphical interface. You will
likely need to have GDAL libraries in the Path still.

-- Chris

> Mano Marks
> Geo Developer Advocate
> http://twitter.com/ManoMarks
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Christopher Schmidt
MetaCarta


More information about the gdal-dev mailing list