0

Using Texmaker 5.04 on Windows 10 (with Python installed and up-to-date via Anaconda), I'm trying to compile the minimal example provided in the minted documentation. I expanded the command string for PdfLaTeX in Texmaker to be:

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

Now, I'm getting the Package minted error, "You must have `pygmentize' installed to use this package."

I have seen similar problems reported, and they indicate an issue with TexMaker not finding pygmentize. I used the Windows Subsystem for Linux (WSL) to investigate. 'which pygmentize' produces:

/home/owner/.local/bin/pygmentize

and /home/owner/.local/bin is the very first part of my $PATH variable. I've tried the solutions presented in other posts, such as using a symbolic link, but I've been unsuccessful. It is a bit confusing in the nether worlds between Windows 10, WSL, and Texmaker, trying to figure out where Texmaker is looking and why it's not finding the pygmentize file. I appreciate your help!

[Update]

Part of my confusion is trying to understand who's running the show... Windows, WSL, TexMaker, or even MikTeX. My WSL approach was probably off the mark. I did subsequently use the Windows 10 MikTeX console to see what I could install there. No immediate help there, but I did stumble upon the pythonhighlight package. (See also this post). It worked right out of the box. It may not be as feature-packed as minted purports to be, but it's much lower on the frustration index, and it appears to fit my current need.

3
  • 1
    are you using a WSL version of texmaker and texlive ? If not the WSL path would not normally be available to a windows application it would be simpler to install a windows pygmentize i would guess. (or use a linux texlive via wsl) Jan 4, 2021 at 21:12
  • Thanks for the response, David! Added more to the post... Jan 5, 2021 at 21:35
  • 1
    to get pygmentize to run in miktex you need a windows python so that pygmentize would run in a cmd window. You can not run wsl applications (safely) from windows, and the PATH you see in a wsl bash is the virtual path as seen from wsl not the path that a windows application would need to find the program Jan 5, 2021 at 21:49

0

You must log in to answer this question.

Browse other questions tagged .