JupyterLab
調整懶人包
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
目標:用起來像 MatLab
(或 RStudio)
預設的 JupyterLab 缺乏甚麼?
這些通通有解!!!
啟動 JupyterLab
基本上高尚的大家應該要這樣開啟
但我很懶怎麼辦?做捷徑(ICON 載點)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
以 chrome app mode 啟用
這樣就賞心悅目了~~
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
之後有些外掛也可能要修改設定,
大致上在以下五處:
.../.jupyter/jupyter_notebook_config.py
.../.jupyter/custom/custom.js
- (Lab跟Notebook共通)View 選單
- Lab 的 Setting 選單
- Lab 的 Advanced Settings (Ctrl+,)
多重 Kernel 安裝
Jupyter 支援多重 Kernel (可執行的語言核心),加上 Anaconda 可以安裝虛擬版本的 Python 環境,所以我們的 Luncher 可以很壯觀:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Python X.X.X/ X.X/ X
建立一個名叫 py36
的 Python 3.6 環境
加到 kernels 裡面叫做 python3.6
平常使用時會顯示「Python 3.6」:
假如我們不想要了
R Kernel
Juila Kernel
JupyterLab Extension Manager
Setting -> Advanced Settings (Ctrl+,) 開啟設定,在 Extension Manager 加入 {"enabled": true}
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
安裝 node.js
啟用 Extension Manager 之後就會出現這個介面
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
安裝外掛,以及要記得 Rebuild
-
一般來說安裝外掛大致長這樣(不建議用剛剛的 Extension Manager 安裝)
-
Rebuild JupyterLab
有甚麼好 labextension 外掛?
-
美化程式碼:
@ryantam626/jupyterlab_code_formatter
(須配合 Python Package black
/yapf
/autopep8
三者至少一個)
-
變數監看:
@lckr/jupyterlab_variableinspector
-
自定義字體:
@deathbeds/jupyterlab-fonts
(搭配 @deathbeds/jupyterlab-font-fira-code
)
-
Open .md With Notebook:
notedown
(非 labextension)
-
支援 ipywidgets
:
@jupyter-widgets/jupyterlab-manager
-
表格瀏覽:jupyterlab-spreadsheet
-
draw.io:jupyterlab-drawio
-
目錄表:@jupyterlab/toc
-
狀態列:@jupyterlab/statusbar
之前避談的事情:
一些小的編輯器功能
(輔助線、程式碼折疊等)
- 有外掛可以用 VS Code 取代預設編輯器但個人尚未嘗試成功
- Jupyter Notebook 的 nbextension 其實做得很好但 JupyterLab 目前無法使用
展望:JupyterLab 1.0
- 官方說 1.0 版 2018 年底會出來,目前 alpha3 版,github 上顯示完成度約 88%。
- 官方宣稱未來 JupyterLab 1.0 會取代現在的 Jupyter Notebook 。
- 不過官方承諾應該會讓大多數 Jupyter Notebook 的外掛可以安裝於 JupyterLab 。
Notebook 的外掛大補帖
- 安裝 jupyter_contrib_nbextensions
- 之後進 Jupyter Notebook 設定即可

小結語:幾乎功能完整的 IDE
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →