Jupyter笔记本TOC没有出现

2024-05-28 11:16:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Anaconda创造了一个新的环境,但我无法让Jupyter笔记本电脑运行。我在Jupyter Configurable nbextensions list is empty尝试了一个类似问题的答案

我最初在Anaconda提示符中创建了新环境,如下所示:

conda create --name py38 python=3.8
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install -c conda-forge notebook
ipython kernel install --name "py38" --user
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter nbextensions_configurator enable --user

预期行为#1enter image description here


实际行为#1

enter image description here


预期行为#2

enter image description here


实际行为#2

enter image description here


我确实注意到,当从Anaconda提示符启动jupyter notebook时,它一直将Config option `template_path` not recognized by打印到提示符中。笔记本电脑启动的很好,但TOC开关不在那里,NBExtensions选项卡看起来与我的其他环境不同。(我试着在Nbextensions选项卡中打开/关闭TOC。)查看上面显示的预期/实际行为屏幕抓图

this discussion relating to ^{} on Github之后,我尝试使用以下命令(在Anaconda提示符中)创建一个新的环境,特别是降级nbconvert,但与上面相同的实际行为仍然存在

conda create --name test2 python=3.8
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install -c conda-forge notebook
conda install -c conda-forge nbconvert==5.6.1
ipython kernel install --name "test2" --user
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter nbextensions_configurator enable --user

如何在Jupyter笔记本的新环境中获取TOC?


Tags: installnameenvconfig环境jupyteranacondaconda