相关疑难解决方法(0)

nbconvert:ValueError:在以下路径中找不到名称为“rst”的模板子目录:[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
Run Code Online (Sandbox Code Playgroud)

代码可以在这里看到:https://github.com/d2l-ai/d2l-book/blob/dev/d2lbook/build.py#L653-L657

我用这个指令nbconvert安装了pandoc ,并且我也安装了。Tex

如何安装rst模板nbconvert?请帮我建议一些解决此问题的方法?

系统信息:

ProductName:    Mac OS X
ProductVersion: 10.15.1
python: 3.6
nbconvert: 6.0.0a3
pandoc: 1.0.2
Run Code Online (Sandbox Code Playgroud)

python restructuredtext jupyter-notebook nbconvert

5
推荐指数
1
解决办法
4088
查看次数