I installed minted today as well as Python and Pygments, which I can run from the cmd. When I try this code:

int main() {
printf("hello, world"); 
return 0;

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.

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.

  • what pdflatex commandline did you use (in particular did you use -output-directory ? – David Carlisle Jul 13 '18 at 17:36
  • @DavidCarlisle Hi, thank you for the swift reply. The command line I used is pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex – BlackBear Jul 13 '18 at 18:08
  • I just tried that exact command and your file worked for me. can you show the full log file? – David Carlisle Jul 13 '18 at 18:15
  • @DavidCarlisle I will try and upload the log file, as it is too long for me to post. EDIT: I hope this link works. – BlackBear Jul 13 '18 at 18:48
  • sorry i can't help, it looks reasonable to me (apart from the error) the actual calls (windows command line from miktex) are a bit different to mine, as I do not use miktex, but look quite plausible. I think you will need someone with a successful run on miktex to compare logs. – David Carlisle Jul 13 '18 at 19:15

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 format

pdflatex --shell-escape %filename.tex to get the output as in PDF format

and the output was generated as:

enter image description here best wishes

|improve this answer|||||
  • thank you for your reply. I have tried your proposed solution, but unfortunately it gave me the same error. Perhaps there is something wrong with my PATH environment or my directory? Unfortunately, I am not tech savy enough to know this. I probably forgot something crucial and/or obvious. – BlackBear Jul 14 '18 at 8:04
  • Can you tell me what release of LaTeX you are using? I am using MikTeX version 2.9 in Windows OS... – MadyYuvi Jul 14 '18 at 15:27
  • I am using MikTex 2.9.6 and TexMaker 5.0 – BlackBear Jul 15 '18 at 15:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.