兩步解決JupyterLab添加目錄插件的問題
寫在前面
- 做這件事的原因:
- 簡簡單單:想給
jupyter lab
安裝目錄 - 兄弟,給jupyterlab安裝目錄,看我就夠了,我百度了好久,找的一堆啥啊,我如果用jupyter notebook還跟你比比這么多干嘛鴨?
- 簡簡單單:想給
- 如果有錯別字呢,哪里寫錯了呢,請在評論區告訴我嗷,同時,可能會有一些奇奇怪怪的符號夾在文字中,這是因為我用的是MarkDown語法,其中一些符號可能在這個平台(比如CSDN)不支持呢。
解決方案
-
眾所周知,安裝jupyterlab的插件需要以下幾步
-
安裝一個插件jupyter_contrib_nbextensions
pip install jupyter_contrib_nbextensions
-
配置 nbextension
jupyter contrib nbextension install --user
-
安裝toc
jupyter labextension install @jupyterlab/toc
-
-
好了問題來了,Node.js和npm你沒有叭,難受了
An error occured. ValueError: Please install Node.js and npm before continuing installation. You may be able to install Node.js from your package manager, from conda, or directly from the Node.js website (https://nodejs.org). See the log file for details: C:\Users\LITIAN\AppData\Local\Temp\jupyterlab-debug-amd3fad2.log
-
啊,這,這道題我會啊,裝不就完事兒了啊:
所以, 【解決方案的第1步】 :安裝nvm,然后通過這個nvm來安裝node和npm,是不是想直到為什么不直接裝,你去官網把node都下好了,為什么我給你看這個?
問的好,看這:Node.js 安裝配置,下面的憑論會告訴你原因的,使用 nvm 管理不同版本的 node 與 npm:
nvm是 Nodejs 版本管理器,它讓我們方便的對切換Nodejs 版本。
-
安裝好了,我們就要開始 【解決方案的第2步】 :用nvm安裝node和npm
nvm install 14.15.3 64-bit
欸?這個時候報錯了:
Could not retrieve https://nodejs.org/dist/latest/SHASUMS256.txt. Get https://nodejs.org/dist/latest/SHASUMS256.txt: dial tcp 104.20.23.46:443: connectex: No connection could be made because the target machine actively refused it.
這尼瑪誰頂得住啊。別擔心,解決方案在下面:使用nvm-windows安裝NodeJs遇到的問題
概括呢:
就是說去nvm的安裝目錄下,找一個settings.txt
打開之后,在后面加上:
node_mirror:npm.taobao.org/mirrors/node/ npm_mirror:npm.taobao.org/mirrors/npm/
然后保存,再開cmd運行
nvm install 14.15.3 64-bit
誒~就很舒服。安裝完之后記得選擇這個使用嗷:
nvm use 14.15.3
-
好了,真的好了,運行等了很久的語句叭
jupyter labextension install @jupyterlab/toc
誒 ~ 舒服!
-
-
除此之外呢,如果還想安裝其他插件呢,看這個鏈接嗷:解決 jupyter labextension install 報錯
jupyter labextension install @jupyterlab/git
jupyter labextension install @jupyterlab/github
jupyter labextension install @jupyterlab/debugger
jupyter labextension install @lckr/jupyterlab_variableinspector
自動格式化代碼
jupyter labextension install jupyterlab_code_formatter
ipynb\py\md文件互相轉換
jupyter labextension install jupytext
markdown拼寫核對
jupyter labextension install jupyterlab_spellchecker
自動補全與跳轉定義
jupyter labextension install @krassowski/jupyterlab-lsp
-
結果展示!
我的CSDN:https://blog.csdn.net/qq_21579045
我的博客園:https://www.cnblogs.com/lyjun/
我的Github:https://github.com/TinyHandsome
紙上得來終覺淺,絕知此事要躬行~
歡迎大家過來OB~
by 李英俊小朋友