You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Debian系统中Jupyter Lab/Notebook出现404错误无法打开笔记本的问题求助

Debian系统中Jupyter Lab/Notebook出现404错误无法打开笔记本的问题求助

我现在在运行Debian 12的戴尔笔记本上没法正常使用Jupyter,目前是在Python虚拟环境里运行Jupyter Lab的。

当我执行jupyter lab命令时,首先会反复弹出如下警告错误:

[W 2025-01-15 18:44:52.720 ServerApp] 404 GET /api/collaboration/room/JupyterLab:globalAwareness (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 39.53ms referer=None

不过Firefox浏览器里的Jupyter菜单显示是正常的。

但当我尝试新建一个笔记本时,就会出现下面的404错误:

[W 2025-01-15 18:45:03.095 ServerApp] 404 PUT /api/collaboration/session/Untitled.ipynb?1736963103090 (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 1.33ms referer=http://localhost:8888/lab

而且打开的笔记本完全加载不出来:

(截图说明:新笔记本页面仅显示顶部"Untitled.ipynb"标题,下方为空白区域,无任何可编辑或交互内容)

以下是完整的控制台输出:

$ jupyter lab
[I 2025-01-15 18:44:09.733 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2025-01-15 18:44:09.736 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2025-01-15 18:44:09.740 ServerApp] jupyterlab | extension was successfully linked.
[I 2025-01-15 18:44:09.899 ServerApp] notebook_shim | extension was successfully linked.
[I 2025-01-15 18:44:09.909 ServerApp] notebook_shim | extension was successfully loaded.
[I 2025-01-15 18:44:09.910 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2025-01-15 18:44:09.911 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2025-01-15 18:44:09.911 LabApp] JupyterLab extension loaded from /home/noe/Documents/univ/TER/venv/lib/python3.11/site-packages/jupyterlab
[I 2025-01-15 18:44:09.912 LabApp] JupyterLab application directory is /home/noe/Documents/univ/TER/venv/share/jupyter/lab
[I 2025-01-15 18:44:09.912 LabApp] Extension Manager is 'pypi'.
[I 2025-01-15 18:44:09.991 ServerApp] jupyterlab | extension was successfully loaded.
[I 2025-01-15 18:44:09.991 ServerApp] Serving notebooks from local directory: /home/noe/Documents/univ/TER/venv
[I 2025-01-15 18:44:09.991 ServerApp] Jupyter Server 2.15.0 is running at:
[I 2025-01-15 18:44:09.991 ServerApp] http://localhost:8888/lab?token=6b54a68b3230f79b6f719f36cdfd9e3dbafcdcba3bc270e7
[I 2025-01-15 18:44:09.991 ServerApp]     http://127.0.0.1:8888/lab?token=6b54a68b3230f79b6f719f36cdfd9e3dbafcdcba3bc270e7
[I 2025-01-15 18:44:09.991 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2025-01-15 18:44:10.009 ServerApp] 
    
    To access the server, open this file in a browser:
        file:///home/noe/.local/share/jupyter/runtime/jpserver-27699-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=6b54a68b3230f79b6f719f36cdfd9e3dbafcdcba3bc270e7
        http://127.0.0.1:8888/lab?token=6b54a68b3230f79b6f719f36cdfd9e3dbafcdcba3bc270e7
[I 2025-01-15 18:44:10.561 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[W 2025-01-15 18:44:12.203 LabApp] Could not determine jupyterlab build status without nodejs
[W 2025-01-15 18:44:52.720 ServerApp] 404 GET /api/collaboration/room/JupyterLab:globalAwareness (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 39.53ms referer=None
[I 2025-01-15 18:45:03.006 ServerApp] Creating new notebook in 
[W 2025-01-15 18:45:03.095 ServerApp] 404 PUT /api/collaboration/session/Untitled.ipynb?1736963103090 (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 1.33ms referer=http://localhost:8888/lab
[W 2025-01-15 18:45:52.743 ServerApp] 404 GET /api/collaboration/room/JupyterLab:globalAwareness (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 1.03ms referer=None
[W 2025-01-15 18:46:52.756 ServerApp] 404 GET /api/collaboration/room/JupyterLab:globalAwareness (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 3.77ms referer=None
w[W 2025-01-15 18:47:52.971 ServerApp] 404 GET /api/collaboration/room/JupyterLab:globalAwareness (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 3.24ms referer=None
[W 2025-01-15 18:48:52.983 ServerApp] 404 GET /api/collaboration/room/JupyterLab:globalAwareness (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 3.23ms referer=None
[W 2025-01-15 18:49:53.027 ServerApp] 404 GET /api/collaboration/room/JupyterLab:globalAwareness (3eb6b7033dd547fbbe52293f4e9e484f@127.0.0.1) 3.63ms referer=None

我的Jupyter相关组件版本信息如下:

$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.31.0
ipykernel        : 6.29.5
ipywidgets       : not installed
jupyter_client   : 8.6.3
jupyter_core     : 5.7.2
jupyter_server   : 2.15.0
jupyterlab       : 4.3.4
nbclient         : 0.10.2
nbconvert        : 7.16.5
nbformat         : 5.10.4
notebook         : not installed
qtconsole        : not installed
traitlets        : 5.14.3

另外,我在虚拟环境外运行jupyter-notebook也会遇到同样的错误,还是没法打开任何笔记本。我觉得不是Jupyter安装的问题,因为我在多个安装环境下都碰到了同样的情况,而且用Docker容器运行Jupyter Lab是正常的。

备注:内容来源于stack exchange,提问作者Noé Mastrorillo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 03:23:11