Looks like a confused gdal and python installation mess...

If you're using my GDAL framework, it uses my UnixImageIO framework for libpng. 
 And, the included gdal-python uses the system python.

But according to the error python is looking for python modules (thus 
gdal-python) in /usr/local.  This implies that the system python is NOT 
running, but a custom install (is that what anaconda is?), with it's own python 
module search path.  I'm guessing that the anaconda python (?) is in 
/usr/local/bin and thus be found before the system python.

PYTHONPATH might work to redirect your custom python to look for the correct 
gdal-python:

  export 
PYTHON_PATH=/Library/Frameworks/GDAL.framework/Versions/1.10/Python/2.7/site-packages

If not, you'll have to uninstall your custom python (anaconda? homebrew?) so it 
doesn't override the system python.

On Jul 5, 2013, at 2:39 PM, Dominik Schneider wrote:

> anyone have any suggestions?! I'm at a complete loss how to troubleshoot.
> 
> 
> Dominik Schneider
> o 303.735.6296 | c 518.956.3978 
> 
> 
> 
> On Tue, Jul 2, 2013 at 10:52 AM, Dominik Schneider 
> <[email protected]> wrote:
> Hi, 
> I am trying to run:
> gdal_merge.py -init -9999 -n 2001 -o 
> MOD09GA.A2012001.h08v05.005.NRTsnow_fraction.tif.1 
> MOD09GA.A2012001.h08v05.005.NRTsnow_fraction.tif
> 
> The Error:
> Traceback (most recent call last):
>   File "/Library/Frameworks/GDAL.framework/Programs/gdal_merge.py", line 36, 
> in <module>
>     import gdal
>   File "/usr/local/lib/python2.7/site-packages/gdal.py", line 2, in <module>
>     from osgeo.gdal import deprecation_warn
>   File "/usr/local/lib/python2.7/site-packages/osgeo/__init__.py", line 21, 
> in <module>
>     _gdal = swig_import_helper()
>   File "/usr/local/lib/python2.7/site-packages/osgeo/__init__.py", line 17, 
> in swig_import_helper
>     _mod = imp.load_module('_gdal', fp, pathname, description)
> ImportError: dlopen(/usr/local/lib/python2.7/site-packages/osgeo/_gdal.so, 
> 2): Library not loaded: libpng15.15.dylib
>   Referenced from: /usr/local/Cellar/gdal/1.10.0/lib/libgdal.1.dylib
>   Reason: image not found
> 
> Gdal is here:
> > which gdal_merge.py
> /Library/Frameworks/GDAL.framework/Programs/gdal_merge.py
> 
> I'm completely new gdal but am guessing i've got some confusion between 
> different versions of gdal and python.  I have rgdal installed so at some 
> point in the past I probably installed gdal too? Today I installed gdal with 
> homebrew and also tried the binary from 
> http://www.kyngchaos.com/software:frameworks
> For python I have the system default (2.7) on osx.7.5 and the anaconda 
> installation.
> 
> I should also say, if I load python I am unable to import gdal:
> > python
> Python 2.7.4 |Anaconda 1.5.1 (x86_64)| (default, May  9 2013, 12:12:00) 
> [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from osgeo import gdal
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/python2.7/site-packages/osgeo/__init__.py", line 21, 
> in <module>
>     _gdal = swig_import_helper()
>   File "/usr/local/lib/python2.7/site-packages/osgeo/__init__.py", line 17, 
> in swig_import_helper
>     _mod = imp.load_module('_gdal', fp, pathname, description)
> ImportError: dlopen(/usr/local/lib/python2.7/site-packages/osgeo/_gdal.so, 
> 2): Library not loaded: libpng15.15.dylib
>   Referenced from: /usr/local/Cellar/gdal/1.10.0/lib/libgdal.1.dylib
>   Reason: image not found
> 
> 
> any help would be appreciated.
> Thanks
> 
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

All generalizations are dangerous, even this one.


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to