0
点赞
收藏
分享

微信扫一扫

Jupyter Notebook添加目录


问题描述

如果用jupyter notebook跑代码时,当分了很多点,想看到对应的目录,对总体有个概览时,会发现notebook木有自动生成目录的栏目。

解决方法

(1)下载插件:

pip install jupyter_contrib_nbextensions

(2)重启打开jupyter,可以发现多了一栏​​Nbextensions​​。

Jupyter Notebook添加目录_html


(3)如果发现栏​​Nbextensions​​的插件很少,那可能要重新下载再启动:

# 1、先卸载扩展包
pip uninstall jupyter_contrib_nbextensions
pip uninstall jupyter_nbextensions_configurator
# 2、再安装Nbextensions
pip install jupyter_contrib_nbextensions
# 3、安装 javascript and css files
jupyter contrib nbextension install --user
# 4、安装configurator

(4)勾选Table of Contents (有的版本是toc2)。jupyter notebook就有目录啦。

Jupyter Notebook添加目录_jupyter_02

Reference

(1)https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html


举报

相关推荐

0 条评论