I installed TeXstudio and texlive with sudo apt install texlive-full afterwards I installed the pygments with sudo apt-get install python-pygments and I used the command % !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape] inside my tex document and I used the \usepackage[cache=false]{minted} as the first package. But I still get the error message \PYGdefault undefined.

I found on a StackExchange page the advice, that there is a folder called _minted_test that should be removed. But where can I find this folder?


  • Try \usepackage[cache=false]{minted}. – Sigur Feb 22 at 12:21
  • I did this too. Sorry I forget to mention it. – susliks2 Feb 22 at 12:25
  • There should be a folder in the same path as the tex file. – Sigur Feb 22 at 12:27
  • I do not have this folder. I always get the error message although it seems that the pdf-output is correctly genereated. – susliks2 Feb 22 at 12:31
  • you say it is_minted_test via one link I read via that reference as _minted-reference in the code so the advice was kill anything that's under _minted* – KJO Feb 23 at 22:22

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.