我对 python 还很陌生。所以我安装了 python,我的编辑器是 Visual Studio Code。智能感知似乎适用于此代码(扩展名 BeautifulSoup): enter image description here
但这不起作用: enter image description here
我尝试重新启动计算机,但没有帮助。
我也尝试过使用虚拟环境,并且我还选择了正确的关联解释器。为了在 Visual Studio Code 中使用 python,我安装了以下扩展:
- MagicPython
- 皮兰斯
- Python
- Python 扩展包
- Visual Studio IntelliCode
您知道为什么我的 Intellisense 不适用于软件包吗?
最佳答案
在 VS Code 中,Python 代码的“Intellisense”功能由 the Python extension 提供。 ,“Pylance”提供的语言服务为我们提供了文档内容。
因此,建议您“禁用”其他扩展程序,以免它们相互干扰,影响“智能感知”功能的使用。
另外,如果还是不行,请重新安装Python扩展并重新加载VS Code。
关于python - Visual Studio Code 中的 IntelliSense 不适用于 python 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66306077/