Can't import GDAL into Python (2.5 or 2.6)

Vincent Habchi vince at macports.org
Fri Aug 20 04:12:31 PDT 2010


Le 20 août 2010 à 13:03, JP Glutting a écrit :

> Which is odd, because I have a gdal.py file (and an osgeo directory) in my /opt/local/lib/python2.6/site-packages directory. But nothing else. I imagine they were supposed to have been installed in 
> 
> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages

Try this:

sudo port -v configure gdal (with your options) and look, at the end of the output, for this line:

checking where to install Python modules... 

What path is printed after?

In my case, I have:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages

which is correct.
Vincent


More information about the macports-users mailing list