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' #設置谷歌瀏覽器