4

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

pygmentize

then the program is run. However, when I do

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

I get

(c:/local/texlive/2016/texmf-dist/tex/latex/beamer/themes/font/beamerfontthemes
erif.sty) (/users/eda/mosekprj/generic/docs/branding/tex-common/msk-math.tex))system returned with code -1

\minted@apppathifexists=

! 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 '17 at 14:05
  • I run the command in the directory in which the tex is located. And yes it is on the C drive. – ErlingMOSEK Jan 9 '17 at 14:05
  • pygmentize are on the PATH. And I run pdflatex from the DOS box in which I check pygmentize can be run. – ErlingMOSEK Jan 9 '17 at 14:06
  • I also tried to add the command \renewcommand{\MintedPygmentize}{c:/local/Anaconda3/Scripts/pygmentize.exe}. But nothing changed. – ErlingMOSEK Jan 9 '17 at 14:11
6

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

http://erlingdandersen.blogspot.dk/2017/01/installing-texlive-2016-on-windows.html

which helped my guess the solution.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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