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

安装jupyter-markdown扩展后Jupyter Lab无法加载的解决方案咨询

解决Jupyter Lab安装jupyter-markdown后加载失败的问题

原本通过pip install安装的Jupyter Lab运行正常,执行pip install jupyter-markdown或通过Jupyter Lab扩展面板安装该扩展后,Lab无法加载,报错如下:

[W 2023-11-09 22:59:30.662 ServerApp] 404 GET /lab/api/settings?1699567170458 (::1): Schema not found: C:/Users/ephra/miniconda3/envs/md/share/jupyter/lab/schemas\@datalayer/jupyter-admin\plugin.json
[W 2023-11-09 22:59:30.663 LabApp] wrote error: 'Schema not found: C:/Users/ephra/miniconda3/envs/md/share/jupyter/lab/schemas\\@datalayer/jupyter-admin\\plugin.json'
    Traceback (most recent call last):
      File "C:\Users\ephra\miniconda3\envs\md\Lib\site-packages\tornado\web.py", line 1784, in _execute
        result = method(*self.path_args, **self.path_kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\ephra\miniconda3\envs\md\Lib\site-packages\tornado\web.py", line 3290, in wrapper
        return method(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\ephra\miniconda3\envs\md\Lib\site-packages\jupyterlab_server\settings_handler.py", line 57, in get
        result, warnings = get_settings(
                           ^^^^^^^^^^^^^
      File "C:\Users\ephra\miniconda3\envs\md\Lib\site-packages\jupyterlab_server\settings_utils.py", line 386, in get_settings
        settings_list, warnings = _list_settings(
                                  ^^^^^^^^^^^^^^^
      File "C:\Users\ephra\miniconda3\envs\md\Lib\site-packages\jupyterlab_server\settings_utils.py", line 211, in _list_settings
        schema, version = _get_schema(
                          ^^^^^^^^^^^^
      File "C:\Users\ephra\miniconda3\envs\md\Lib\site-packages\jupyterlab_server\settings_utils.py", line 55, in _get_schema
        raise web.HTTPError(404, notfound_error % path)
    tornado.web.HTTPError(404: Not Found (Schema not found: C:/Users/ephra/miniconda3/envs/md/share/jupyter/lab/schemas\@datalayer/jupyter-admin\plugin.json)
[W 2023-11-09 22:59:30.665 LabApp] 404 GET /lab/api/settings?1699567170458 (a8be64fc149d42c2b38ccd8d38f052f5@::1) 100.08ms referer=http://localhost:8888/lab

以下是无需重建虚拟环境的解决方法:

方法一:卸载问题依赖并修复Lab

  1. 先卸载引发问题的扩展及关联依赖:
pip uninstall -y jupyter-markdown jupyter-admin
  1. 清理Jupyter Lab缓存并重建:
jupyter lab clean
jupyter lab build
  1. 启动Jupyter Lab,确认恢复正常。

方法二:安装兼容版本的jupyter-markdown

问题根源是jupyter-markdown依赖的jupyter-admin版本与当前Jupyter Lab版本不兼容,导致schema文件缺失。可以指定兼容版本安装:

  1. 查看当前Jupyter Lab版本:
jupyter lab --version
  1. 根据Lab版本选择对应兼容的jupyter-markdown版本(比如Lab 4.x可尝试0.2.x版本,Lab 3.x用0.1.x版本),示例命令:
pip install jupyter-markdown==0.1.5
  1. 安装完成后执行jupyter lab build,再启动Lab验证。

方法三:手动补全缺失的schema文件(备选)

如果上述方法无效,可手动创建缺失的文件:

  1. 新建目录:C:/Users/ephra/miniconda3/envs/md/share/jupyter/lab/schemas/@datalayer/jupyter-admin/
  2. 在该目录下创建plugin.json,写入基础配置:
{
  "title": "Jupyter Admin Settings",
  "description": "Settings for Jupyter Admin extension",
  "type": "object",
  "properties": {}
}
  1. 启动Jupyter Lab,检查是否能正常加载。

内容的提问来源于stack exchange,提问作者ezyman

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.06 19:12:30