I installed minted today as well as Python and Pygments, which I can run from the cmd. When I try this code:
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{minted}{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}
I get the following error message:
! Package minted Error: Missing Pygments output; \inputminted was
probably given a file that does not exist–otherwise, you may need the
outputdir package option, or may be using an incompatible build tool,
or may be using frozencache with a missing file.See the minted package documentation for explanation.
Type H for immediate help.
…
\end{minted}
The other threads didn't help me and neither did Google. How do I solve this problem? I have set my option in pdfLatex to:
pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %filename.tex
Here is my log file.
My PATH is set so I can execute Python and pygmentize from the cmd without errors, and I can load the package as well. When it comes to using the minted package is when I receive the error.
Best Answer
Your codes are working fine for me, I've tried the following commands I used the
DOS
prompt to get the output, hope--shell-escape
is the solution for your problem, but not sure, please try at your end:latex --shell-escape %filename.tex
to get the output as in DVI formatpdflatex --shell-escape %filename.tex
to get the output as in PDF formatand the output was generated as:
best wishes