What is the reason for the following error?
Package minted Error: You must invoke LaTeX with the -shell-escape flag.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.Sign up to join this community
The package minted uses an external software »pygments«, written in Python. So pdfLaTeX needs to run »third party software«. This brings security issues: the external software can do anything, as far as your rights on the computer allow that.
Be aware of this when you start pdfLaTeX with
-shell-escape. Pygments is used a lot, so if there were an issue, somebody would probably notice it. But if you ever start experimenting with Lua programms of whatever source, maybe think twice.
By the way, the name »shell-escape« refers to the fact that the external software is started via a system call in a shell of the OS.