【发布时间】:2020-06-17 14:15:55
【问题描述】:
我正在使用nbconvert 将markdown 文件转换为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
【问题讨论】:
-
您可以安装旧版本的 nbconvert,因为类似的错误 5.6.1 适合我。
-
这也救了我。谢谢@Joost
标签: python jupyter-notebook restructuredtext nbconvert