VS Code安装Python扩展报错:end of central directory record signature not found
解决VS Code Python扩展安装报错:end of central directory record signature not found
问题说明
安装VS Code的Python扩展时,自动安装或手动安装均触发以下错误:
Error while installing 'Python' extension. Please check the
[log](command:workbench.action.showWindowLog)for more details.
日志中显示核心错误:
[error] end of central directory record signature not found,end of central directory record signature not found: Error: end of central directory record signature not found,end of central directory record signature not found
解决步骤
清理扩展缓存
- 彻底关闭VS Code(包括后台运行的进程)
- 定位到扩展缓存目录:
- Windows:
%USERPROFILE%\.vscode\extensions\.cache - macOS/Linux:
~/.vscode/extensions/.cache
- Windows:
- 删除该目录下所有文件,重启VS Code后重新尝试安装
重新下载并校验扩展包
- 手动下载Python扩展的最新
.vsix安装包 - 对比官方提供的校验值(MD5/SHA256),确认文件未损坏
- 在VS Code中按下
Ctrl+Shift+P(Windows/Linux)或Cmd+Shift+P(macOS),执行命令Extensions: Install from VSIX...,选择下载好的文件完成安装
- 手动下载Python扩展的最新
临时关闭签名验证
- 打开VS Code设置,搜索
extensions.verifySignature - 将该选项设置为
false,重启VS Code后尝试安装,安装完成后可改回默认值
- 打开VS Code设置,搜索
手动解压安装
- 使用可靠的解压工具(如7-Zip)将
.vsix文件解压到VS Code的extensions目录:- Windows:
%USERPROFILE%\.vscode\extensions - macOS/Linux:
~/.vscode/extensions
- Windows:
- 确保解压后的文件夹名称符合扩展命名规范(一般为
ms-python.python-版本号),重启VS Code即可
- 使用可靠的解压工具(如7-Zip)将
内容的提问来源于stack exchange,提问作者Eddie Bickel
相关产品推荐
相关产品推荐

