0

I am trying to run python code within my latex code. i tried simple hellow world example but i have occured through this error . my latex file name is pyinlt.tex

Error:

i can't find file 'pyinlt.py.out'         
   <to be read again>
                \def         

Source file:

\documentclass{article}
\usepackage{python}
\begin{document}
Say hello Python:
\begin{python}
print r"Hello \LaTeX!"    
\end{python}        
\end{document}
3
  • Please post the contents of the pyinlt.log file. Commented May 11, 2014 at 15:14
  • Try to compile it with latex -shell-escape pyinlt.tex Commented May 11, 2014 at 15:15
  • Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. Commented Jun 11, 2014 at 23:23

1 Answer 1

1

python environnement requires some privilege that are disabled by default. The way to compile is to enable them by using -shell-escape at compilation time:

latex -shell-escape pyinlt.tex

You must log in to answer this question.