I am doing some troubleshooting on a Macbook Air (Linux user here) that has got an issue with running minted on MacOSX Mojave. I've been doing so successfully in Ubuntu, and never had any issues there. On Mojave, I installed pygmentize at usr/local/bin, and ran pdflatex via command line with the --shell-escape flag, but it is giving me a fatal error and no output. Is there anything I overlooked?

EDIT: This is a sample of the document I tried to compile - I have tried it on my own laptop, and it runs without any issues.

import math, random
import numpy as np
print "Hello World"

The latex compile command I use on Linux is

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

Is there something macOS specific I need to change?

  • What is the error message you're given? – Skillmon Jun 24 at 13:26
  • Fatal Error - 100 undefined \PYG control sequences (it lists them all in the log). Seems like it can't find the path to pygmentize, but I wouldn't know where else to put it – schrodingerscat Jun 24 at 13:31
  • 1
    Could you supply a MWE so we can check the document syntax? – Herb Schulz Jun 24 at 16:14
  • First you say pygmentize is in usr/local/bin, do you mean /usr/local/bin? Please check which pygmentize to make sure it's along the PATH. Also check pygmentize -V to see that it's actually executable. I'm having no problem on my system using macOS 10.14.5 (Mojave). – Herb Schulz Jun 25 at 16:25
  • I'm having the same issue. It works fine on Debian, but not on OSX. Pygementize OSX: Pygments version 2.4.2, (c) 2006-2019 by Georg Brandl., Linux: Pygments version 2.2.0, (c) 2006-2017 by Georg Brandl. – Christophe De Troyer Nov 26 at 17:40

Your Answer

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

Browse other questions tagged or ask your own question.