问题描述:
突然发现vscode在编写python脚本时,没有函数提示了,而且打开时,右下角有弹窗报错内容为:Sorry,something went wrong activating IntelliCode support for Python.Please check the "Python" and "VSIntelliCode" output windows for details.
解决过程:
1.打开vscode的output window:
方法:vscode菜单栏:view-output,打开output window,右侧选择框中选择python查看python报错。
查看到报错内容为:
[error] sendStartupTelemetry() failed. [Error: The language client requires VS Code version ^1.91.0 but received version 1.89.1
即:安装的 Python 扩展版本(2024.14.0)要求 VS Code 的版本为 ^1.91.0(即 1.91.0 或更高版本),而当前的 VS Code 版本是 1.89.1。这意味着 VS Code 版本过低,无法满足 Python 扩展的要求。
2.更新vscode:
运行如下命令:
sudo apt update
sudo apt upgrade code
更新后,重启vscode,解决问题。