Himanshu Malhotra Himanshu Malhotra - 1 year ago 229
LaTeX Question

Runtime error in build_pdf module of latex - python

Below is my latex_template.py file

min_latex = (r"\documentclass{article}"
r"Hello, world!"

from latex import build_pdf

# this builds a pdf-file inside a temporary directory
pdf = build_pdf(min_latex)

# look at the first few bytes of the header
print bytes(pdf)[:10]

When I try to run this file I get the following error:

python latex_template.py
Traceback (most recent call last):
File "latex_template.py", line 9, in <module>
pdf = build_pdf(min_latex)
File "/home/psycane/test/venv/local/lib/python2.7/site-packages/latex/build.py", line 205, in build_pdf
raise RuntimeError('No available builder could be instantiated. '
RuntimeError: No available builder could be instantiated. Please make sure LaTeX is installed.

Please help!

Answer Source

It seems like your're missiing the latex binaries.

On linux machines it's calles texlive --> More infos

For example Ubuntu:

sudo apt-get install texlive

For OSX you can install MacTex

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download