1、打开windows10的开始菜单,选择 Anaconda Prompt。
2、安装Nbextension插件,此插件是Jupyter非官方扩展包的集合,可以为Jupyter提供很多实用的功能。
【注】直接安装会比较慢,可以选择镜像安装。
# 直接安装
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
#镜像安装
pip install jupyter_contrib_nbextensions -i https://pypi.tuna.tsinghua.edu.cn/simple
jupyter contrib nbextension install --user
3、安装并启用Jupyter Nbextensions Configurator
# 镜像安装
pip install jupyter_nbextensions_configurator -i https://pypi.tuna.tsinghua.edu.cn/simple
jupyter nbextensions_configurator enable --user
4、安装完成后,重新启动jupyter,就可以看到Nbextensions了。
5、 点击Nbextensions,取消勾选。
6、勾选Hinterland(自动补全功能)
7、常用插件
1)Hinterland : 自动补全功能
2)Table of Contents :自动生成目录插件,安装这个插件以后,会自动在大纲视图
3)Codefolding : 增加折叠代码的功能(包括Python依据缩进折叠、其他代码依据方括号折叠、依据注释折叠)
4)Autopep8 : 代码格式化的工具(需要安装autopep8包)
5)Variable Inspector : 在工具栏中增加变量检查的功能
6)Hide input all : 在工具栏中增加隐藏所有代码单元的功能
7)Code Font Size : 设置代码字体大小的工具
8)Comment/Uncomment Hotkey : # 增加注释/取消注释的热键