VS Code 1.106.3更新后Python 3.12.4的Jupyter内核端口超时启动失败
VS Code Jupyter内核启动超时问题排查
环境信息
- 操作系统:Windows 11 Pro 24H2
- VS Code:1.106.3(问题自本次更新后出现)
- Python:3.12.4(安装路径:
C:\Program Files\Python312\python.exe) - VS Code Jupyter:使用内置官方扩展
问题描述
更新VS Code至1.106.3后,内置Jupyter笔记本无法启动内核。外部运行Python 3.12.4一切正常,但在VS Code中运行笔记本单元格时弹出以下错误:
Failed to start the Kernel. Unable to start Kernel 'Python 3.12.4' due to a timeout waiting for the ports to get used. View Jupyter log for further details.
日志详情:
09:12:01.852 [error] Error in execution (get message for cell) Error: Unable to start Kernel 'Python 3.12.4' due to a timeout waiting for the ports to get used. View Jupyter log for further details. Kernel Id = .jvsc74a57bd09240d949b7e875368571ba59acc67192d2efbcc4561b3c6f94c83d7858e18732.c:\Program Files\Python312\python.exe.c:\Program Files\Python312\python.exe.-m#ipykernel_launcher Interpreter Id = c:\Program Files\Python312\python.exe at ~.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\dist\extension.node.js:304:47046
已尝试操作
- 执行
python -m jupyter notebook --no-browser,确认外部Jupyter可正常启动 - 通过
code --disable-extensions禁用所有扩展启动VS Code,问题依旧存在 - 执行命令
pip install --upgrade pip; pip install --upgrade jupyter ipykernel; python -m ipykernel install --user --name=py312升级并重装相关依赖 - 检查防火墙及杀毒软件规则,确保
Code.exe和python.exe被允许联网 - 查看VS Code开发者工具控制台,未发现明确的额外错误信息
咨询问题
- VS Code Jupyter扩展中的“端口等待超时”错误通常指向什么问题?
- VS Code 1.106.3与Python 3.12的Jupyter内核是否存在已知兼容性问题?
- 需要收集哪些日志或执行哪些诊断步骤来定位问题根源?
- 在回滚VS Code版本之前,还有哪些修复或临时方案可以尝试?
可提供的额外信息:Jupyter完整日志、VS Code开发者工具输出、jupyter --version及pip list结果
内容的提问来源于stack exchange,提问作者user67275
相关产品推荐
相关产品推荐

