【发布时间】:2020-05-30 10:59:11
【问题描述】:
我在桌面上创建了一个名为 project_env 的虚拟环境。然后我从 github (https://github.com/googleapis/google-api-python-client) 安装了 Google API Python 客户端。然后使用以下代码创建了一个名为 youtube.py 的 Python 文件。当我运行文件时,我得到“ImportError no module googleapiclient”
from googleapiclient.discovery import build
api_key = "My Key"
youtube = build('youtube', 'v3', developerKeys=api_key)
request = youtube.channels().list(
part='statistics',
forUsername='livelifetothefull'
)
response = request.execute()
print(response)
我对此很陌生,因此非常感谢任何帮助。
【问题讨论】:
标签: python google-api-python-client