事象
Jupyter LabにExtensionを導入しようとしたら以下の様なエラーが発生した。
root@096e8b5bcfb1:/usr/src/app# jupyter labextension install jupyterlab_vim 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: /tmp/jupyterlab-debug-lniy1xvy.log
対応方法
記載の通り、Node.jsとnpmをインストールする
# dockerfileに書き足した内容 RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs RUN npm install npm@latest -g
間違えた内容
・pipでnode.jsとnpmをインストールしていた
→利用したいのは、あくまでもOS側
・普通にapt-getなどでnode.jsをインストールする
古いNode.js(v10系)がダウンロードされる。
Jupyter Extentionは最低v12系が必要との事で動かなかった。
その他
利用したかったExtensionが現時点では利用できそうになかった。。
(別途開発版とかでごにょごにょすればいけるかもか)
# jupyter labextension install jupyterlab_vim An error occured. ValueError: The extension "jupyterlab_vim" does not yet support the current version of JupyterLab.