使用Python在谷歌地图中绘制点

时间:2016-04-24 15:09:28

标签: python google-maps pygmaps

我正在尝试找到一个库,以便在特定的Google地图位置绘制一些点。我找到了pygmapsgmplot。当我尝试导入gmplot(已安装)时,出现以下错误:

>import gmplot

Traceback (most recent call last):
                .
                .
from gmplot import GoogleMapPlotter
ImportError: cannot import name 'GoogleMapPlotter'

另一方面,尝试使用pip安装pygmaps似乎它找不到库:

>pip install pygmaps

Could not find a version that satisfies the requirement pygmaps( from versions:)

我在网上找不到任何关于它的信息。知道什么可能是错的或者是否有另一个库来完成我的任务?提前致谢

2 个答案:

答案 0 :(得分:1)

由于Google Maps Engine和Google Maps Coordinate等已弃用的Google Maps API很少,您可以按API Client Library for Python中的说明下载最新的Python客户端库。

此SO帖子 - Cannot import name GoogleMaps in python也可能有所帮助。 :)

答案 1 :(得分:0)

当添加对python3 +导入的支持时,pypi上的gmplot版本没有受到影响,这是ImportError的原因。如果升级安装,它现在应该可以使用版本1.1.1。