0 Problem
最近看了下李沐老師的mxnet教程,在使用jupyter的時候打開教程發現全是markdown源文,沒有展示markdown格式的文字。
1 Reason
源代碼是用markdown格式存儲的,而不是jupyter默認的ipynb格式。
jupyter要通過notedown插件來使用markdown。
2 Solution
我瀏覽的時候教程里的安裝指導沒有涉及到這一步,而且notedown參考安裝的鏈接已失效。
在李沐老師的教學視頻中發現了安裝方法。
pip install https://github.com/mli/notedown/tarball/master
jupyter notebook --NotebookApp.contents_manager_class='notedown.NotedownContentsManager'
另外,可以通過配置,默認開啟notedown插件,這樣就不用每次都加這么長的參數了。首先生成配置文件。
jupyter notebook –generate-config
在配置文件(~/.jupyter/jupyter_notebook_config.py)末尾加入
c.NotebookApp.contents_manager_class = ‘notedown.NotedownContentsManager’
之后就只需要運行jupyter notebook就可以本地訪問教程和代碼了。
