根据 geopandas文档,我正在尝试对字符串列表进行地理编码,但出现错误。
我的环境
import geopandas as gdp
from geopandas.geocode import geocode
import geopy
import sys
print(sys.version)
print (gdp.__version__)
print (geopy.__version__)
3.4.3 |Anaconda 2.2.0 (x86_64)| (default, Mar 6 2015, 12:07:41)
[GCC 4.2.1 (Apple Inc. build 5577)]
0.1.1
1.10.0
我正在尝试做
geocode(['boston, ma', '1600 pennsylvania ave. washington, dc'])
我收到以下错误
AttributeError Traceback (most recent call last)
<ipython-input-77-d7e5e2fb2b1d> in <module>()
----> 1 geocode(['boston, ma', '1600 pennsylvania ave. washington, dc'])
/Users/tbmh1/anaconda/envs/devData34/lib/python3.4/site-packages/geopandas-0.1.1-py3.4.egg/geopandas/geocode.py in geocode(strings, provider, **kwargs)
70 'bing': geopy.geocoders.Bing,
71 'yahoo': Yahoo,
---> 72 'mapquest': geopy.geocoders.MapQuest,
73 'openmapquest': geopy.geocoders.OpenMapQuest,
74 'nominatim' : geopy.geocoders.Nominatim}
AttributeError: 'module' object has no attribute 'MapQuest'
当文档说 googlev3 是默认提供程序时,我不知道它为什么要尝试执行 MapQuest。我在 python 2.7 中遇到同样的错误