I exactly followed the instruction and I also tried those solutions on this link: How to install syntax highlight package minted on Windows 7? Unfortunately, I could not run minted package on Texmaker. I have got error when it is compiled. Any idea about this issue?

runsystem(del transfer*report.aex)...executed.
runsystem(for ^%i in (pygmentize.exe pygmentize.bat pygmentize.cmd) do set >tra
nsfer*report.aex <nul: /p x=^%~$PATH:i>>transfer*report.aex)...executed.
! Emergency stop.<read 3>
*** (cannot \read from terminal in nonstop modes)

enter image description here

Content of C:\Python27\Scripts\pygmentize.cmd:

@echo off
set PYTHONPATH=C:\Python27
%PYTHONPATH%\Scripts\pygmentize.exe %*

Windows Path is also done as:


Also I can see by SET command on cmd path has C:\Python27;C:\Python27\Scripts.

On command line the pygmentize looks installed correctly as:

C:\Python27\Scripts>pygmentize -V
Pygments version 1.6, (c) 2006-2013 by Georg Brandl.

Texmaker compilation option is also changed as:

pdflatex -shell-escape -synctex=1 -interaction=nonstopmode %.tex

I also tried to uninstall and install minted package over "MikTex 2.9" -> "Package Manager". But there is not any improvement.

Edit : I realized that it is working in a separate latex file as


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

So it should be there some package conflicts or stg like how can I understand it, any idea?


2 Answers 2


Edit: According to OP the missing “s” was just a typo here in question (but made twice then …).

The pygmentize.cmd is never found because of a typo you did in the Windows path – you forgot an “s” at the very end, it’s C:\Python27\Scripts.

BTW: When pygmentize.exe is really also in C:\Python27\Scripts you do not need pygmentize.cmd at all as long as it is in this same folder.

  • This is not the case! Because I just mistype it here not in real scenario. Furthermore, without pygmentize.cmd or with pygmentize.cmd, it is giving the same error. Any other idea ?
    – io517
    Commented Mar 6, 2014 at 16:41
  • Did you perhaps forget to add the command line option --shell-escape in Texmaker settings?
    – Speravir
    Commented Mar 6, 2014 at 18:53
  • I have done it before, I think there is a conflict with some other packages or my template but I could not figure it out. If I only put my example in a separate latex file there is not any problem. But with my normal tex file doesnt work. No idea :(
    – io517
    Commented Mar 7, 2014 at 13:54

I had the exact same problem. Removing all spaces from the name of the TeX file fixed it.

You must log in to answer this question.

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