[Qgis-user] Mac OSX - ImportError: No module named gdal

William Kyngesburye woklist at kyngchaos.com
Wed Feb 15 07:15:11 PST 2012


The readme on the binary distribution has what you're looking for - the GDAL path in the GdalTools settings also needs /usr/bin:

Select GdalTools Settings from the Raster menu  (If you don't have the Raster menu, you need to enable the GdalTools plugin with the Plugin Manager). Enter the following for the GDAL path:

/Library/Frameworks/GDAL.framework/Programs:/usr/bin


Though when I think about it, that was for when Python is not found at all from external scripts.  Your error says a module is not found.  Python obviously is running, but maybe the wrong one...  see if /usr/bin fixes it for now.

On Feb 15, 2012, at 8:53 AM, dpan wrote:

> Hi all, 
> 
> I've searched the archives for similar problems, but other posts seem
> Windows-specific. Getting this error on attempts to run gdal_polygonize:
> 
> File
> "/library/frameworks/GDAL.framework/Versions/1.8/Programs/gdal_polygonize.py",
> line 34, in 
> import gdal, ogr, osr
> ImportError: No module named gdal
> 
> Any suggestions greatly appreciated! If a setting needs to be changed,
> fairly explicit directions would be helpful as I'm a novice and not very
> familiar with the architecture. 
> 
> Thanks!
> Dave
> 
> Software:
> Mac OSX 10.6.8
> QGIS version 1.8.0-Trunk
> Compiled against Qt 4.7.3
> GDAL/OGR Version 1.8.1
> PostgreSQL Client Version 9.0.4
> QWT Version 5.2.1
> QGIS code revision 7f611e9
> Running against Qt 4.7.3
> GEOS Version 3.3.0
> SpatiaLite Version 2.4.0
> 
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Mac-OSX-ImportError-No-module-named-gdal-tp4472441p4472441.html
> Sent from the Quantum GIS - User mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.




More information about the Qgis-user mailing list