第一步:在anaconda中的Anaconda Prompt的root(或者base)環境下依次運行以下命令,在其他環境下發現沒有效果
命令1:
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
命令2:
pip install --user jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
第二步:安裝成功會在http://localhost:8888/tree中出現Nbextensions
點擊並勾選Hinteriand,即可開啟代碼提示功能
更改主題:
1、設置主題和背景
1.1 安裝背景
pip install jupyterthemes
1.2更新主題
pip install --upgrade jupyterthemes
1.3 查看可用主題
jt -l
1.4 選擇黑色背景monokai,它還支持語法高亮。
jt -t monokai -f fira -fs 13 -cellw 90% -ofs 11 -dfs 11 -T -N
-f(字體) -fs(字體大小) -cellw(占屏比或寬度) -ofs(輸出段的字號) -T(顯示工具欄) -N(顯示自己主機名)
其余參數,大家可以查詢文檔。
參考 :https://blog.csdn.net/panshangfeng/article/details/100731033