文章目录
进入虚拟环境
运行Anaconda Powershell Prompt或Anaconda Prompt
安装并激活 jupyter_contrib_nbextensions
方案一 pip安装
pip install -i https://mirrors.aliyun.com/pypi/simple flask
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
pip install jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
方案二 conda安装
conda install -c conda-forge jupyter_contrib_nbextensionsconda install -c
conda-forge jupyter_nbextensions_configurator
安装完成以后,打开 jupyter notebook 可以看到菜单栏多了 :Nbextensions 一栏,这样就可以安装插件了。
常用插件介绍
Table of Contents :自动生成目录
如果在 jupyter notebook 中使用了markdown对程序进行了解释和说明的话,那么安装这个插件以后,会自动在大纲视图。
Variable Inspector :查看变量
类似于 Matlab 和 R studio 的工作空间,可以查看变量名、类型,大小,形状和值。其中变量的 shape (形状)这个参数在进行矩阵运算时,十分实用,并且这个窗口还可以调节大小,排序等功能。
ExcecuteTime: 查看代码执行时间
这个插件会代码模块最后计算该模块的计算时间和运行结束时间,美观实用。
其他插件
Codefolding: 代码折叠
Autopep8: 自动代码格式优化
AutoSaveTime: 控制脚本的自动保存时间
Hide Input All: 隐藏所有的代码单元,保持所有的输出和 markdown 单元可见
Spellchecker: 对 markdown 单元中的内容进行拼写检查