So I installed Shapely with easy_install but when I try:

 

>>> from shapely.geometry import Point

 

I'm getting "undefined symbol" errors. This is happening on two
different computers so I'm not sure what I'm missing.

 

First server is Ubuntu 6.06 LTS, Python 2.4.3 with ctypes installed.
Libgeos is installed with libgeos_c.so.1.3.3 and libgeos.so.2.1.4 (So it
looks like I need to upgrade libgeos anyway). Here's the error I get:

 

>>> from shapely.geometry import Point

Traceback (most recent call last):

  File "<stdin>", line 1, in ?

  File
"/usr/lib/python2.4/site-packages/Shapely-1.0.8-py2.4.egg/shapely/geomet
ry/__init__.py",

line 1, in ?

    from geo import shape, asShape

  File
"/usr/lib/python2.4/site-packages/Shapely-1.0.8-py2.4.egg/shapely/geomet
ry/geo.py",

line 5, in ?

    from point import Point, asPoint

  File
"/usr/lib/python2.4/site-packages/Shapely-1.0.8-py2.4.egg/shapely/geomet
ry/point.py",

line 10, in ?

    from shapely.geos import lgeos, DimensionError

  File
"/usr/lib/python2.4/site-packages/Shapely-1.0.8-py2.4.egg/shapely/geos.p
y",

line 54, in ?

    execfile(os.path.join(_here, 'ctypes_declarations.py'))

  File
"/usr/lib/python2.4/site-packages/Shapely-1.0.8-py2.4.egg/shapely/ctypes
_declarations.py",

line 233, in ?

    lgeos.GEOSWKTReader_create.restype = ctypes.c_void_p

  File
"/usr/lib/python2.4/site-packages/ctypes-1.0.2-py2.4-linux-x86_64.egg/ct
ypes/__init__.py",

line 353, in __getattr__

    func = self.__getitem__(name)

  File
"/usr/lib/python2.4/site-packages/ctypes-1.0.2-py2.4-linux-x86_64.egg/ct
ypes/__init__.py",

line 358, in __getitem__

    func = self._FuncPtr((name_or_ordinal, self))

AttributeError: /usr/lib/libgeos_c.so.1: undefined symbol:
GEOSWKTReader_create

 

 

However, I get a very similar error on my laptop, which is Ubuntu 8.04
with Python 2.5.2 and libgeos.so.2.2.3, which should meet all of the
dependencies:

 

>>> from shapely.geometry import Point

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File
"/usr/lib/python2.5/site-packages/Shapely-1.0.8-py2.5.egg/shapely/geomet
ry/__init__.py",

line 1, in <module>

    from geo import shape, asShape

  File
"/usr/lib/python2.5/site-packages/Shapely-1.0.8-py2.5.egg/shapely/geomet
ry/geo.py",

line 5, in <module>

    from point import Point, asPoint

  File
"/usr/lib/python2.5/site-packages/Shapely-1.0.8-py2.5.egg/shapely/geomet
ry/point.py",

line 10, in <module>

    from shapely.geos import lgeos, DimensionError

  File
"/usr/lib/python2.5/site-packages/Shapely-1.0.8-py2.5.egg/shapely/geos.p
y",

line 54, in <module>

    execfile(os.path.join(_here, 'ctypes_declarations.py'))

  File
"/usr/lib/python2.5/site-packages/Shapely-1.0.8-py2.5.egg/shapely/ctypes
_declarations.py",

line 19, in <module>

    lgeos.GEOS_getWKBOutputDims.restype = ctypes.c_int

  File "/usr/lib/python2.5/ctypes/__init__.py", line 361, in __getattr__

    func = self.__getitem__(name)

  File "/usr/lib/python2.5/ctypes/__init__.py", line 366, in __getitem__

    func = self._FuncPtr((name_or_ordinal, self))

AttributeError: /usr/lib/libgeos_c.so.1: undefined symbol:
GEOS_getWKBOutputDims

 

 

I'm guessing that ctypes hates me. Any ideas as to why?

 

Thanks,  

 

Marc

 

 

 

n
Marc Pfister
Technology Manager
ENPLAN
[EMAIL PROTECTED]
530/221-0440 x108
530/221-6963 Fax

 

_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to