Python GEOS ImportError

Bru*_*uce 5 python django geos

我收到此错误:

ImportError: Could not find the GEOS library (tried ""geos_c"", ""libgeos_c-1"").  
Try setting GEOS_LIBRARY_PATH in your settings
Run Code Online (Sandbox Code Playgroud)

当我跑步时:

from django.contrib.gis.geos import *
pnt=GEOSGeometry('POINT(23 5)')
print(pnt)
Run Code Online (Sandbox Code Playgroud)

我加入GEOS_LIBRARY_PATH = 'C:/Python34/Lib/site-packages/osgeo/geos_c.dll'
C:\Python34\Lib\site-packages\django\conf\project_template\project_name\settings.py

但我仍然遇到相同的错误。如何解决呢?

Tom*_*Rup 1

您确定路径正确吗?这是我的道路:

GEOS_LIBRARY_PATH = 'c:\\Program Files\\PostgreSQL\\9.1\\bin\\libgeos_c-1'
Run Code Online (Sandbox Code Playgroud)

您需要 PostgreSQL 中的 GEOS。