我正在使用nbconvert
将标记文件转换为pdf。在代码中,我使用了writer = nbconvert.RSTExporter()
,但在使用writer.from_notebook_node()
呈现结果时,我遇到了错误:
ValueError: No template sub-directory with name 'rst' found in the following paths:
/Users/hoanguyen/Library/Jupyter
/Users/hoanguyen/miniconda3/envs/d2l-book/share/jupyter #this is my current environment
/usr/local/share/jupyter
/usr/share/jupyter
代码可以在这里看到:https://github.com/d2l-ai/d2l-book/blob/dev/d2lbook/build.py#L653-L657
我安装了nbconvert
,pandoc和this instruction,我也安装了Tex
如何为nbconvert
安装rst
模板?请帮我建议一些解决这个问题的方法
系统信息:
ProductName: Mac OS X
ProductVersion: 10.15.1
python: 3.6
nbconvert: 6.0.0a3
pandoc: 1.0.2
出于未知原因,6.0.0及更高版本不包括模板。解决方法是从存储库中的旧版本手动下载它们。(例如v5.6.1)
相关问题 更多 >
编程相关推荐