我一直在寻找在python中生成一些简单的LaTeX文档,我发现了PyLaTex,它看起来很简单。在它的PyPi包页面上,它有一个运行的示例脚本。我安装了它并运行了脚本,但它出现了以下错误:
/bin/sh: pdflatex: command not found
Traceback (most recent call last):
File "/Users/Danyon/Documents/Uni/CSSE1001/PyLaTex/plt.py", line 60, in <module>
doc.generate_pdf()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pylatex/document.py", line 127, in generate_pdf
subprocess.check_call(command, shell=True)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'pdflatex --jobname="default_filename" "default_filename.tex"' returned non-zero exit status 127
显然,我没有pdflatex,但我似乎无法找到它的位置或如何在Mac上安装它。 我有Mac OS Air w / OS 10.10.3和Python 3.4.3