2

import shapely.geometry在解释器中工作正常,但代码在运行时抛出此错误:

AttributeError: function 'GEOSversion' not found

也试过

import geos  
ImportError: No module named geos`

但是Shapely过去运行完美。

在 SO 中没有找到有关此问题的任何帖子。任何帮助深表感谢。谢谢!

从此链接安装的 Shapely‑1.3.2.win‑amd64‑py2.7.exe应该包含 GEOS 依赖项。

在 Win7 64 位上运行 Python 2.7 64 位 Anaconda。将 Eclipse 与 PyDev 一起使用

Traceback (most recent call last):
File "C:\...\file.py", line 3, in <module>
import shapely.geometry
File "C:\Users\AppData\Local\Continuum\Anaconda\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
from .base import CAP_STYLE, JOIN_STYLE
File "C:\Users\AppData\Local\Continuum\Anaconda\lib\site-packages\shapely\geometry\base.py", line 9, in <module>
from shapely.coords import CoordinateSequence
File "C:\Users\AppData\Local\Continuum\Anaconda\lib\site-packages\shapely\coords.py", line 8, in <module>
from shapely.geos import lgeos
File "C:\Users\AppData\Local\Continuum\Anaconda\lib\site-packages\shapely\geos.py", line 125, in <module>
geos_version_string, geos_version, geos_capi_version = _geos_version()
File "C:\Users\AppData\Local\Continuum\Anaconda\lib\site-          packages\shapely\geos.py", line 112, in _geos_version
GEOSversion = _lgeos.GEOSversion
File "C:\Users\AppData\Local\Continuum\Anaconda\lib\ctypes\__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "C:\Users\AppData\Local\Continuum\Anaconda\lib\ctypes\__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'GEOSversion' not found
4

0 回答 0