无法导入谷歌地方api Python

问题描述 投票:0回答:1

我安装了这个包:https://github.com/slimkrazy/python-google-places

执行以下步骤:

pip install https://github.com/slimkrazy/python-google-places/zipball/master

OR

pip install python-google-places

Download source and then: python setup.py install

但是当我尝试导入它时,它表示没有名为googleplaces的模块,即使我可以在我的库目录中找到该库(C:\ Python \ Lib \ site-packages)

我尝试将它添加到Python Path变量,但它不起作用。

谢谢你的帮助

python google-places-api
1个回答
0
投票

作为python的新手,我遇到了同样的问题。如果您像我一样使用anaconda和VScode,那么解决方案可能是要关注您正在使用的环境以及安装软件包的环境。

使用conda env list查看哪个环境处于活动状态

您是否在该环境中安装了该软件包?您是否也从该环境中启动了VSCode? (在我的情况下)

我通过从右侧env启动VScode解决了这个问题。

enter image description here

希望这有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.