在googlemaps包中找不到GoogleMaps

时间:2019-04-29 03:36:11

标签: python python-3.x google-maps

我尝试了此导入语句,但它不起作用:

from googlemaps import GoogleMaps

这是我要运行的代码:

address = "207 N. Defiance St, Archbald, OH"
print(GoogleMaps().address_to_latlng(address))

我使用以下代码安装了该软件包:

conda install -c conda-forge googlemaps

我在做什么错了?

1 个答案:

答案 0 :(得分:0)

尝试:

 from googlemaps.client import Client

 [...]

 address = "207 N. Defiance St, Archbald, OH"
 print(Client().address_to_latlng(address))