1
我是mannnik的新手,面臨類似的問題。 mapnik每次嘗試從python geospatial開發書中編譯示例代碼時都拋出運行時錯誤消息。 這是問題的根源。Mapnik Shapefile數據源運行時錯誤
datasource = mapnik.Shapefile(file="world_borders.shp")
polygonLayer = mapnik.Layer("Polygons")
polygonLayer.datasource = datasource
polygonLayer.styles.append("polygonStyle")
error message
Traceback (most recent call last):
File "createExampleMap.py", line 45, in <module>
datasource = mapnik.Shapefile(file="world_borders.shp")
File "C:\Python27\lib\site-packages\mapnik\__init__.py", line 341, in Shapefile
return CreateDatasource(keywords)
RuntimeError: Could not create datasource for type: 'shape'
I'd appreciate help from anyone thanks
在windows上有同樣的問題,檢查和更改mapniklibpath爲我解決它。 – tom