(202506最新)Jupyter Notebook显示目录的导航栏

Jupyter Notebook显示目录的导航栏

  • [一、CSDN Jupyter Notebook左边导航目录安装方法过时](#一、CSDN Jupyter Notebook左边导航目录安装方法过时)
  • 二、2025年6月查看侧边栏的方法
    • [step1:pip install 依赖](#step1:pip install 依赖)
    • [step2: 点点点](#step2: 点点点)

一、CSDN Jupyter Notebook左边导航目录安装方法过时

ModuleNotFoundError: No module named 'notebook.nbextensions'

jupyter_contrib_nbextensions 这个扩展尝试从 notebook 模块中导入 notebook.nbextensions,但该模块在新版的 notebook 中已经不存在或被重构了。所以安装失败。
网上这些帖子都是2021年2022年的,现在的 JupyterLab 官方对于JupyterLab 4.x明确提示:

jupyter labextension install 已不推荐使用(deprecated),建议用 pip 或 conda 安装 预构建好的扩展(prebuilt extensions)。

因为 jupyter_contrib_nbextensions 已经不兼容新版 Jupyter Notebook(例如 v7 及以上)。目前(截至 2025 年)Jupyter 项目已经将很多功能拆分或重构到了 JupyterLab 和 Jupyter Server 架构中,jupyter_contrib_nbextensions 项目已经多年没有维护更新。

所以按照以下步骤查看版本:可以看到notebook的版本已经是7.3.2了,且jupyterlab的版本已经是4.3.4了。所以搜索后推荐的csdn安装版本(普遍21-22年)基本都已经不适用了。

bash 复制代码
jupyter --version

# 以下为输出结果
Selected Jupyter core packages...
IPython          : 8.30.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.6
nbformat         : 5.10.4
notebook         : 7.3.2
qtconsole        : not installed
traitlets        : 5.14.3

二、2025年6月查看侧边栏的方法

step1:pip install 依赖

安装常用扩展支持(有些版本Anaconda默认安装了,可以跳过这一步)

bash 复制代码
pip install ipywidgets jupyterlab_widgets
  • ipywidgets: 支持滑动条、下拉菜单等交互控件
  • jupyterlab_widgets: 让 widgets 在 JupyterLab 4 中可用
bash 复制代码
jupyter --version

# 以下内容为输出
Selected Jupyter core packages...
IPython          : 8.30.0
ipykernel        : 6.29.5
ipywidgets       : 8.1.7
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.6
nbformat         : 5.10.4
notebook         : 7.3.2
qtconsole        : not installed
traitlets        : 5.14.3

如果是notebook v7.3.2,这俩安装后,重启jupyter notebook能试试右侧预览面板:

其他版本有些内置了有些没内置,看不到也不影响。

step2: 点点点

点击 View → Table of Contents.(如果快捷键没用冲突,Ctrl+Shift+K也可以出现目录左侧导航)

相关推荐
tjjucheng19 小时前
靠谱的小程序定制开发哪个好
python
num_killer19 小时前
小白的Langchain学习
java·python·学习·langchain
WangYaolove131419 小时前
基于深度学习的中文情感分析系统(源码+文档)
python·深度学习·django·毕业设计·源码
自学不成才20 小时前
深度复盘:一次flutter应用基于内存取证的黑盒加密破解实录并完善算法推理助手
c++·python·算法·数据挖掘
徐先生 @_@|||21 小时前
Palantir Foundry 五层架构模型详解
开发语言·python·深度学习·算法·机器学习·架构
ba_pi1 天前
每天写点什么2026-01-13-Langchain-Chatchat及开发环境
jupyter·langchain·ollama
深蓝电商API1 天前
Scrapy爬虫限速与并发控制最佳实践
爬虫·python·scrapy
Derrick__11 天前
淘宝MD5爬虫
爬虫·python
薛定谔的猫19821 天前
llama-index Embedding 落地到 RAG 系统
开发语言·人工智能·python·llama-index
nimadan121 天前
**手机小说扫榜工具2025推荐,精准追踪榜单动态与题材风向
python·智能手机