第一步:打开cmd窗口,执行下面的命令,安装jupyter_contrib_nbextensions,如果已经安装过,可以不用再进行安装。
pip install jupyter_contrib_nbextensions
第二步:在cmd窗口中继续执行下面的命令
jupyter contrib nbextension install --user
第一步和第二步一般不会出问题
第三步:在cmd窗口中执行这个命令
jupyter labextension install @jupyterlab/toc
目录插件如果安装成功则如下:
如果第三步不成功出现如下错误提示;
C:\Users\Administrator>jupyter labextension install @jupyterlab/toc
Errored, use --debug for full output:
ValueError: Please install nodejs 5+ and npm before continuing installation. nod
ejs may be installed using conda or directly from the nodejs website.
或者如下错误提示
C:\Users\Administrator>pip install jupyterlab_toc
Collecting jupyterlab_toc
Could not find a version that satisfies the requirement jupyterlab_toc (from v
ersions: )
No matching distribution found for jupyterlab_toc
或者是下面的错误提示:
pip install jupyterlab_toc -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
或者是下面的详细错误提示:
解决方案
错误提示的原因是电脑上没有安装nodejs或者没有安装合适版本的nodejs,安装之后再重新执行上面的命令就可以在jupyter lab中装好目录插件了
具体操作步骤见下面的链接:
https://www.pinggu.com/post/details/5ec67f828e16033f18946287





