问题描述
当我尝试使用ToC将jupyter笔记本下载为HTML时,它会给出一个
When I try to download jupyter notebook as HTML with ToC, it gives a
我尝试重新安装nbextensions,升级笔记本,并尝试使用 File>> Download As 方法和命令方法下载笔记本,所有这些都没有运气.
I have tried to reinstall nbextensions, upgrade notebook, and tried to download notebook with the File>>Download As method and the command method, all with no luck.
jupyter nbconvert --to html_toc names.ipynb
出现以下错误
File "C:\Users\Elle\miniconda3\lib\site-packages\jinja2\loaders.py", line 429, in load
raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: toc2
我能够以HTML格式下载,但无法使用ToC进行下载.toc2文件夹位于 \ miniconda3 \ share \ jupyter \ nbextensions
中.toc2.tpl位于 \ miniconda3 \ Lib \ site-packages \ jupyter_contrib_nbextensions \ templates
I was able to download as HTML, but unable to do so with ToC. The toc2 folder is in \miniconda3\share\jupyter\nbextensions
. The toc2.tpl is in \miniconda3\Lib\site-packages\jupyter_contrib_nbextensions\templates
我不确定应该执行什么步骤来进行这项工作.
I am not sure what steps I should follow to have this work.
推荐答案
在谷歌搜索后,我通过将nbconvert降级到5.6.1版来解决了该问题
After googling, I fixed it by downgrading nbconvert to version 5.6.1
conda install "nbconvert=5.6.1"
这篇关于如何通过toc将Jupyter Notebook作为HTML下载来解决错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!