Install the python package
$pip install jupyter_contrib_nbextensions
$conda install -c conda-forge jupyter_contrib_nbextensions
Install javascript and css files
$jupyter contrib nbextension install --user
安装一些插件并启用插件管理器
$ jupyter nbextensions_configurator install --user
$ jupyter nbextensions_configurator enable --user
打开jupyter notebook会发现菜单栏多了一个选项Nbextensions
记得勾选disable configuration for nbextensions without explicit compatibility (they may break your notebook environment, but can be useful to show for nbextension development),否则下方插件是不可选状态
选择插件
我们从上面可以看出,jupyter notebook有很多插件,我们可以选择几个插件
- Table of Contents
- Execute Time
- Nofity
- Codefolding
- Hinterland
jupyter notebook_启动出错
jupyter notebook_启动出错_ValueError: Please install nodejs 5+ and npm before continuing installation.
解决方案:
我的电脑上安装了Anaconda,我打开Anacoda后
修改jupyter notebook默认目录
打开Anaconda Prompt
在Anaconda Prompt终端中输入下面命令,查看你的notebook配置文件在哪里:jupyter notebook --generate-config
打开配置文件jupyter_notebook_config.py找到
c.NotebookApp.notebook_dir
删除c.NotebookApp.notebook_dir 前面的“#”符号(#表示注释的意思),然后修改为自己创建的目录路径,保存.py文件。不同操作系统的电脑路径不一样,windows是双斜杠(),linux是反斜杠(/)
设置快捷方式中的目标与起始位置
重启jupyter_notebook
修改jupyter notebook默认指定浏览器
打开配置文件jupyter_notebook_config.py找到
添加代码
import webbrowser webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\Program Files\Google\Chrome\Application\chrome.exe')) c.NotebookApp.browser = 'chrome' #设置谷歌浏览器