JelteF / PyLaTeX

A Python library for creating LaTeX files
https://jeltef.github.io/PyLaTeX/
MIT License
2.25k stars 286 forks source link

Issue with pdflatex missing #194

Open tanishqkancharla opened 7 years ago

tanishqkancharla commented 7 years ago

Hello, I'm new to python but I want to use pylatex. So far, I've installed correctly and can import fine, but every time I try to generate the pdf, doc.generate_pdf, the following error is thrown: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/Tanishq/.virtualenvs/discord/lib/python3.6/site-packages/pylatex/document.py", line 274, in generate_pdf raise(os_error) File "/Users/Tanishq/.virtualenvs/discord/lib/python3.6/site-packages/pylatex/document.py", line 228, in generate_pdf stderr=subprocess.STDOUT) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 403, in run with Popen(*popenargs, **kwargs) as process: File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in __init__ restore_signals, start_new_session) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1333, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex'

How can I fix this? i'm using Mac. And I'm installing latex through a virtualenv called discord.

JelteF commented 7 years ago

Make sure pdflatex/texlive (and maybe latexmk) is installed and in your PATH.

On Tue, Sep 19, 2017, 19:58 tklightningfast notifications@github.com wrote:

Hello, I'm new to python but I want to use pylatex. So far, I've installed correctly and can import fine, but every time I try to generate the pdf, doc.generate_pdf, the following error is thrown: Traceback (most recent call last): File "", line 1, in File "/Users/Tanishq/.virtualenvs/discord/lib/python3.6/site-packages/pylatex/document.py", line 274, in generate_pdf raise(os_error) File "/Users/Tanishq/.virtualenvs/discord/lib/python3.6/site-packages/pylatex/document.py", line 228, in generate_pdf stderr=subprocess.STDOUT) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 336, in check_output *kwargs).stdout File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 403, in run with Popen(popenargs, **kwargs) as process: File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in init restore_signals, start_new_session) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1333, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex'

How can I fix this? i'm using Mac. And I'm installing latex through a virtualenv called discord.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JelteF/PyLaTeX/issues/194, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG8JjwdzagaWcrjEK69baCWeTsQHluIks5skADPgaJpZM4PcyQH .