python - 找不到函数的定义 - VSCode Python

标签 python visual-studio-code

我正在使用 VSCode for Python 以及在 VSCode 中启用的 Microsoft for Python 扩展。
对于 Python v3.9.0 我得到 No definition found 如果我尝试寻找函数定义。
enter image description here
但是,如果我将 Conda Virtual 环境用于 Python 3.7.0,则不会出现错误
可能是什么问题?

最佳答案

当我使用您提供的代码并禁用 Python 扩展时,我遇到了与您相同的问题。
由于对应的语言服务扩展支持“Go to Definition”,建议您检查当前的Python扩展是否可用,并确认选择的python interpreter也可用。另外,请尝试重新加载VSCode。

关于python - 找不到函数的定义 - VSCode Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64255834/

相关文章:

powershell - 无法从 PowerShell : access denied 运行 .cmd

python - 是否有受支持的方法来使用 Google 云 Python SDK 验证服务帐户而不使用 key 文件?

python - 使用编译函数时出现UnicodeEncodeError

angular - ng : The term 'ng' is not recognized as the name of a cmdlet, 函数 Visual Studio Code 终端

electron - 如何在 Visual Studio Code 中将 ${workspaceRoot} 用于我的 Electron 应用程序?

git - VS Code 在交互式 rebase 期间不等我

python - 如何获得与 SQLAlchemy 存在多重关系的匹配记录?

python - 替换 Python 3.1 中字符串中的重复字符

python - 在 Python 中从 curl 读取 JSON 文件

visual-studio-code - 如何删除 Visual Studio Code 中的重复行?