[英]Receiving Error Message When Attempting to Import Googleads with Python
Attempting to use the googleads adwords api尝试使用 googleads adwords api
from googleads import adwords
and get并得到
ModuleNotFoundError: No module named 'googleads'
I had previous done the我以前做过
python -m pip install google-ads
and am running on a macbook pro我在 macbook pro 上运行
How do I resolve this?我该如何解决这个问题?
Edit编辑
I didn't set up an active virtual environment first, could that be the issue?我没有先设置一个活动的虚拟环境,这可能是问题所在吗? And as an aside, why is that necessary?顺便说一句,为什么这是必要的?
The new version of the Python Library changed the name of the module. Python Library的新版本更改了模块的名称。
https://github.com/googleads/google-ads-python/issues/475 https://github.com/googleads/google-ads-python/issues/475
the module path changed from google_ads to googleads, removing the underscore (_).模块路径从 google_ads 更改为 googleads,删除了下划线 (_)。 For all usage of v10 and onward, you should use import google.ads.googleads对于 v10 及更高版本的所有使用,您应该使用 import google.ads.googleads
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.