python - 无法解析 apiclient.discovery。该模块可能缺少智能感知

标签 python visual-studio-2015 intellisense google-api-python-client ptvs

我已经安装了 Visual Studio 2015 Community 和 Visual Studio 的 Python 工具。但我无法让 Intellisense 识别我通过 pip install google-api-python-client 安装的 Google API。

这是我的导入的样子:

from apiclient.discovery import build
from apiclient.http import MediaFileUpload

我的脚本运行,但我没有获得自动完成功能。 有什么办法可以解决这个问题吗?

最佳答案

我找到了答案。我所要做的就是将导入语句更改为:

from googleapiclient.discovery import build
from googleapiclient.http import MediaFileUpload

现在自动完成功能可以工作了。

关于python - 无法解析 apiclient.discovery。该模块可能缺少智能感知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35712946/

相关文章:

vue.js - 如何在 VS Code 中的 vue 文件中为 sass 启用自动完成/IntelliSense?

python - 是否可以将 C 预处理器宏可靠地转换为 python 代码?

python - scipy 最小化 slsqp,导致 OverflowError : Python int too large to convert to C long

python - 工作 python xml

c# - 类库中的 Razor,缺少智能感知

qt - Qt Creator 中的功能图标是什么意思?

Python,使用 mechanize 时出现 "Out of memory"错误

visual-studio - 如何禁用系统托盘中的 VsHub.exe?

visual-studio - Visual Studio 2015空闲时CPU消耗高

visual-studio-2015 - InfVerif.exe 的示例用法