Trying to use Minted/Pygments to show code in a document.Even using the minimum working example found in the Minted documentation produces the error.

    int main() {
    printf("hello, world");
    return 0;

I have installed Python 3.6.2 and used pip to confirm that Pygments 2.2.0 is installed.

The error produced is:

Process started: latex.exe -src -interaction=nonstopmode --shell-escape "document".tex

"exist" was unexpected at this time.

"^%i" was unexpected at this time.

Process exited with error(s)

As you can see I've already called shell-escape and that doesn't cause issues in the log or messages section of TexStudio. Even with an empty document just calling the package produces the error.

Any help would be much appreciated!


This is fixed in the latest MiKTeX release. Just run the MiKTeX updater to get the latest version.

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.