> Hi. Good day. 
> 
> I am having an import error problem. Last week, I was following this site: 
> http://sites.google.com/site/spatialpython/processing-aster-with-python-numpy-and-gdal.
>  I was able to make the python script run on the terminal. But this week, it 
> was throwing some error. 
> 
> This was the traceback:
> 
> Traceback (most recent call last):
>   File "aster_convert.py", line 2, in <module>
>     from osgeo import gdal
>   File "/usr/lib/python2.6/dist-packages/osgeo/__init__.py", line 21, in 
> <module>
>     _gdal = swig_import_helper()
>   File "/usr/lib/python2.6/dist-packages/osgeo/__init__.py", line 17, in 
> swig_import_helper
>     _mod = imp.load_module('_gdal', fp, pathname, description)
> ImportError: /usr/lib/libspatialite.so.2: undefined symbol: GEOSSimplify
> 
> I tried google-ing for the ImportError but the results dont make sense. It 
> was working last week. I might have installed something that "broke" it but I 
> dont know how to trace it back.
> 
> Could I ask for some pointers on how to fix this? 

I have absolutely no experience with the libraries you're using, but the error 
tells you that libspatialite is expected to have the symbol GEOSSimplify (could 
be a function or a class definition, for example), which isn't found.
The first Google hit for libspatialite results in 
http://www.gaia-gis.it/spatialite/how_to_build_libspatialite.html , which 
mentions two required dependencies: PROJ.4 and GEOS. Probably the latter 
provides GEOSSimplify.
So, you've either uninstalled the GEOS library, your LD_ LIBRARY_PATH settings 
settings aren't what they were a week ago, or you've reinstalled libspatialite, 
but this time with the no-geos option.

For a quick check, try the following from the command line:
$> ldd /usr/lib/libspatialite.so.2

and see if it has any missing dependencies. If there's any missing (you can 
also post the output here if you'd like), see if you can that dependency 
somewhere on your system (the 'locate' command can help, or just good-old 
'find'). If it's missing from libspatialite but you can find that library 
somewhere on your system (that would probably be the GEOS library then), it's 
your LD_LIBRARY_PATH that's likely different.

Also, what linux distro are you using? Maybe you've been using the package 
manager overzealously, causing some essential packages to be modified or 
removed?

And how did you install libspatialite; or for that matter, osgeo?


> 
> Thank you.
> 
> Roy
> 
> P.S. I dont know if this is the right list to post this. If it isnt, I'm 
> sorry for the inconvenience. Kindly direct me to the right one.  

If libspatialite or osgeo has a mailing list, you could (also) try that one. 
While this error shows up in Python, it's more likely a generic 
installation/system settings problems. Which are often tricky to find the 
correct mailing list for, actually, as long as it's not clear what's the 
underlying cause.


Good luck, and let us know what you find.

  Evert

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to