I have installed TexLive 2016 and Anaconda3 on a Windows Server 2016. When I open a DOS box and type


then the program is run. However, when I do

c:\local\texlive\2016\bin\win32\pdflatex.exe -shell-escape talk.tex

I get

erif.sty) (/users/eda/mosekprj/generic/docs/branding/tex-common/msk-math.tex))system returned with code -1


! Package minted Error: You must have `pygmentize' installed to use this package.

See the minted package documentation for explanation.
Type  H <return>  for immediate help.

l.40 \begin{document}

Any suggestions for a solution or how to debug this?

  • What does echo %PATH% in the DOS box give? How exactly are you running pdflatex (same DOS box, same directory or ...?).
    – Joseph Wright
    Jan 9, 2017 at 14:05
  • I run the command in the directory in which the tex is located. And yes it is on the C drive. Jan 9, 2017 at 14:05
  • pygmentize are on the PATH. And I run pdflatex from the DOS box in which I check pygmentize can be run. Jan 9, 2017 at 14:06
  • I also tried to add the command \renewcommand{\MintedPygmentize}{c:/local/Anaconda3/Scripts/pygmentize.exe}. But nothing changed. Jan 9, 2017 at 14:11

1 Answer 1


The problem can be fixed by doing

set PATH=c:\windows\system32;%PATH%

this makes sure cmd.exe is available. My guess is pdflatex or minted requires cmd.exe.

I do know why cmd.exe is not on the PATH on a Windows 2016. Most likely for security reasons.

See also


which helped my guess the solution.


You must log in to answer this question.

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