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.

closed as unclear what you're asking by TeXnician, Stefan Pinnow, Sebastiano, Andrew Swann, Phelype Oleinik Aug 20 '18 at 10:57

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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

  • 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.