jupyter notebook的插件安裝及文本格式修改


jupyter notebook的插件安裝及文本格式修改

1.jupyter notebook拓展插件安裝

啟動jupyter notebook : 打開控制台輸入命令 jupyter notebook
安裝Jupyter notebook extensions擴展插件:
1、pip install jupyter_contrib_nbextensions
或者
1、pip install https://github.com/jupyter-contrib/jupyter_contrib_nbextensions/tarball/master
2、jupyter contrib nbextension install --user
3、安裝后重新啟動控制台窗口: 再次執行命令jupyter notebook 便可以看到在web端看到如下窗口:

2.部分常用插件介紹

VIM binding:該插件使得jupyter notebook集成VIM環境,可以使用VIM所有快捷鍵進行擼代碼;
Codefolding :既可以對標題進行折疊,也可以對代碼進行折疊,觀看方便;
ExecuteTime : jupyter支持分步調試,所以該插件支持顯示每步的執行時間;
Notify:這是jupyter Notebook中的通知機制,耗時任務當離開時完成時可自動提示。
jupyter notebook主題背景和字體更改

3.更改jupyter的樣式

舒適的擼代碼主題背景無論對於眼睛還是心情都有重要作用,接下來我們就安裝選擇適合自己的主題背景和字體

在控制台下用pip 安裝jupyter-themes : pip install --upgrade jupyterthemes
使用如下命令查看所有可用的主題:

在CMD中輸入jt -l
Available Themes:
   chesterish
   grade3
   monokai
   oceans16
   onedork
   solarizedd
   solarizedl

再可以使用如下命令選擇適合自己的主題背景
username$ jt -t grade3(主題名稱)
1
更改字體可以通過如下命令
username$ jt -f inconsolata(字體名稱)

4.常用各種命令

options arg default
Usagehelp -h
List Themes -l
Theme Name to Install -t
Code Font -f
Code Font-Size -fs 11
Notebook Font -nf
Notebook Font Size -nfs 13
Text/MD Cell Font -tf
Text/MD Cell Fontsize -tfs 13
Pandas DF Fontsize -dfs 9
Output Area Fontsize -ofs 8.5
Mathjax Fontsize (%) -mathfs 100
Intro Page Margins -m auto
Cell Width -cellw 980
Line Height -lineh 170
Cursor Width -cursw 2
Cursor Color -cursc
Alt Prompt Layout -altp
Alt Markdown BG Color -altmd
Alt Output BG Color -altout
Style Vim NBExt -vim
Toolbar Visible -T
Name & Logo Visible -N
Reset Default Theme -r
Force Default Fonts -dfonts

5.展示一種主題背景和格式

1、 執行命令: jt -f inconsolata -t grade3

2、 執行命令:jt -t oceans16 -f inconsolata


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM