nbconvert: ValueError: No template sub-directory with name 'rst' found in the following paths: [LS OF PATHS]

nbconvert: ValueError: No template sub-directory with name 'rst' found in the following paths: [LS OF PATHS]

我正在使用 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,带有 this instruction 的 pandoc,我也安装了 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