jupyter notebook安装插件

jupyter notebook安装插件

jupyter notebook被广泛使用,插件能大大提高效率。

如果要在虚拟环境中安装插件,会遇到各种问题,建议先在虚拟环境外面安装好,然后进入虚拟环境再使用,虚拟环境有可能不会显示nbextensions。

准备工作

1 下载所有的插件,进入cmd中输入:

pip install jupyter_contrib_nbextensions

2 将插件工具栏添加到jupyter notebook页面中,相当于安装工具栏,cmd中输入:

jupyter contrib nbextension install

3 此时工具栏已经安装好,但是可能不会显示工具栏,加上以下命令,显示工具栏:

# 安装Jupyter的配置器
pip install jupyter_nbextensions_configurator

# 启动配置器,让工具栏可视
jupyter nbextensions_configurator enable --user

4 进入jupyter notebook,cmd中输入:

jupyter notebook

可以看到Nbextensions工具栏
在这里插入图片描述
工具栏已经安装好,将disable configuration for nbextensions without explicit compatibility一栏去掉勾选,就可以选择下面想要的插件了。
在这里插入图片描述

选择插件

1 Hinterland

coding时肯定需要自动填充功能,jupyter notebook默认的状态并不理想,此插件可以增加此功能。

2 Code prettify

格式化代码,相当于pycharn中的Ctrl + Alt + L

3 Execute Time

显示一个cell执行花费的时间

猜你喜欢

转载自blog.csdn.net/Zeus_daifu/article/details/123761543