1. 第一步:安装 Nbextensions
在Anaconda Prompt 中输入:
conda install -c conda-forge jupyter_contrib_nbextensions
2. 第二步:开启 Table of Contents 插件:
打开jupyter notebook后,出现Nbextensions模块,进入后,点击勾选Table of Contents 。
3. 第三步:生成目录:
打开或新建一个notebook,工具栏右侧出现目录图表。
Nbextensions只显示几个自带的扩展,想装新的但是找不到入口
解决方案:
第一步:卸载已安装的
执行下面两个指令
pip uninstall jupyter_contrib_nbextensions
pip uninstall jupyter_nbextensions_configurator
第二部:安装
执行下面三个指令
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
pip install jupyter_nbextensions_configurator
在执行时报错
引发了一系列错误(节选):
File "D:\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 430, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
产生错误的原因
因为这些源是国外的,在国内访问很慢,因此造成了超时错误
解决方法
将下载源改为国内的下载源即可
代码格式:
pip install 第三方库名 -i 网址
国内源:
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
豆瓣:http://pypi.douban.com/simple/