我已经通过这个教程https://github.com/mapnik/mapnik/wiki/WindowsInstallation安装了mapnik。我认为安装成功了,因为6.step上的测试没有错误。
接下来,我将通过本教程进行处理:http://www.bostongis.com/PrinterFriendly.aspx?content_name=generating_osm_tiles
我尝试了这个命令:python generate_xml.py osm.xml my_osm.xml --dbname=postgis --user postgres --port 5432 --extent 2430885.23, 6221979.54,2452356.05, 6243283.96 --accept-none
出现以下错误:Error: saving xml requires Mapnik python bindings to be installed
所以我在google python bindings上找到了这个:https://github.com/mapnik/python-mapnik并安装了pip install mapnik Collecting mapnik Downloading mapnik-0.1-cp27-none-any.whl (37.4MB) 100% |################################| 37.4MB 30kB/s Installing collected packages: mapnik Successfully installed mapnik-0.1
和下一个命令python setup.py install
有错误:
Traceback (most recent call last):
File "setup.py", line 87, in <module>
' +', ' ', cflags.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
AttributeError: 'NoneType' object has no attribute 'replace'`
这是setup.py:http://pastebin.com/LZiGQTmz
我安装了mapnik2.2和python2.7,以及OS windows。有什么想法吗?
转载请注明出处:http://www.mrdmz.com/article/20230526/2496560.html