I'm tinkering with adding Python functionality to LaTeX, and I prefer to use Eclipse as my editor. I have tried a simple code:




print 'Hello World'


I get the following error:

running: /usr/texbin/pdflatex -synctex=1 -interaction=nonstopmode --src-specials document.tex 
pdflatex> This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex)
pdflatex>  restricted \write18 enabled.
pdflatex>  Source specials enabled.
pdflatex> entering extended mode
pdflatex> (./document.tex
pdflatex> LaTeX2e 
pdflatex> Babel  and hyphenation patterns for 79 languages loaded.
pdflatex> (/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
pdflatex> Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
pdflatex> (/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo))
pdflatex> (/usr/local/texlive/2015/texmf-dist/tex/latex/python/python.sty)
pdflatex> (./document.aux)
pdflatex> ! I can't find file `document.py.out'.
pdflatex>                    \def 
pdflatex> l.14 \end{python}
pdflatex> (Press Enter to retry, or Control-D to exit)
pdflatex> Please type another input file name
pdflatex> ! Emergency stop.
pdflatex>                    \def 
pdflatex> l.14 \end{python}
pdflatex> !  ==> Fatal error occurred, no output PDF file produced!
pdflatex> Transcript written on document.log.

I am running Mac OSX 10.10.5. It seems like I should be adding some parameters to the builder but I'm not sure what. Thanks in advance for the assistance.

  • 4
    restricted \write18 won't allow it to run python, add --shell-escape flag on the pdflatex command line, Oct 3, 2015 at 18:48
  • I replaced the parameters in the builder with that but it didn't work. However, putting that flag ahead of the parameters in the builder has worked! Hopefully this helps someone else in the future. Oct 3, 2015 at 20:39
  • I'd recommend having a look at the pythontex package. Feb 9, 2017 at 11:55

1 Answer 1


See exchange above. Adding --shell-escape ahead of the arguments in the menu Eclipse>Preferences>Texlipse>Builder Settings worked out. Thx to David Carlisle

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .