Windows10启动Jupyter Lab报错:Error Starting Kernel Failed to fetch
问题:Jupyter Lab循环弹出内核启动及服务器连接错误
环境与操作背景
- Windows10系统,通过PowerShell终端执行
jupyter lab启动Jupyter Lab - 近期将Python 3.10.x升级至3.12.2,并执行以下命令更新Jupyter核心包:
pip install --upgrade IPython ipykernel ipywidgets jupyter_client jupyter_core jupyter_server jupyterlab nbclient nbconvert nbformat notebook qtconsole traitlets
出现的问题
打开Jupyter Lab后始终循环弹出两个警告:
- "Error Starting Kernel Failed to fetch"
- "Server Connection Error A connection to the Jupyter server could not be established. JupyterLab will continue trying to reconnect. Check your network connection or Jupyter server configuration."
注:更新前Jupyter Lab就存在该问题,当前仅有的可用内核为"Python 3 (ipykernel)",Jupyter Notebook也出现相同警告。
已尝试的无效解决方法
- 执行
jupyter kernelspec list,修改kernel.json中argv路径为"C:\\Users\\M S\\AppData\\Local\\Programs\\Python\\Python312\\python.exe",无效后改回"python"; - 在终端执行命令安装新内核:
python -m venv \AppData\Local\Programs\Python\Python312python -m pip install ipykernelpython -m ipykernel install --name python3.12.2kernel --display-name "Python 3.12.2 (ipykernel)" --user
- 删除
.jupyter\lab\workspaces下最新的默认工作区; - 卸载旧Python版本、Jupyter后仅重装JupyterLab;
- 清除浏览器缓存。
内容的提问来源于stack exchange,提问作者M S
相关产品推荐
相关产品推荐

