【发布时间】:2021-05-26 04:18:32
【问题描述】:
第一次在这里发帖,顺便说一下,我对这行特定的 Python (3.6) 代码有疑问:
file_converted = pandoc.convert_file(PATH_TO_ODT, 'pdf', format="odt", outputfile=file_name + ".pdf", extra_args=['--pdf-engine=pdflatex'])
当我执行脚本(将 .odt 文件转换为 .pdf 文件)时,遇到以下错误:
RuntimeError: Pandoc died with exitcode "47" during conversion: b'pdflatex not found. Please select a different --pdf-engine or install pdflatex
基本上我知道我需要 "pdflatex" ,但是在我使用命令通过 pip 安装它之后
pip install pdflatex,执行产生相同的错误信息,我应该做什么或检查?
谢谢大家。
【问题讨论】:
-
在 pypadoc 本身支持的名称中使用另一个 pdf 引擎会产生另一个错误:
RuntimeError: Pandoc died with exitcode "1" during conversion: b'pdf-engine wkhtmltopdf is not compatible with output format latex -
我正在使用 ubuntu 18.04,谢谢
标签: python-3.x pandoc pypandoc