I'm new to LaTeX and I want to use it for my homeworks.

Before asking help here, I opened a issue on minted's github, and the guy suggested to go here. So here is my problem :

I'm trying to use tcolorbox with minted,

Here is a test code :


\begin{tcblisting}{minted language=java, listing only}
    String s = "abc";

It don't want to compile it, because it doesn't find Python. I have a full portable installation of MiKTeX, VS Code (LaTeX Workshop) and of Python 3.8

By the way, I tried minted without tcolorbox and it worked perfectly.

Test code :


  String s = "abc";

Here is compilation's log of tcolorbox + minted tex file : test.log

And compilation's log of minted tex file : test_2.log

  • Did you compile your document with -shell-escape flag enabled? tex.stackexchange.com/questions/99475/…
    – Alan Xiang
    Dec 22, 2020 at 1:06
  • Yes, I compiled with -shell-escape flag and I tried --enable-write18 too
    – Danks Meme
    Dec 22, 2020 at 6:42
  • tcolorbox activates the autogobble option, and you seem to have problems with the python code this calls. What happens in the example without tcolorbox if you add the option \begin{minted}[autogobble]{java}? Dec 22, 2020 at 10:00
  • 1
    I added \begin{minted}[autogobble]{java} and checked the output and I found the same error on my problem : r:\LaTeX\Cours\test>set /p x= 0<nul: 1>>test.aex (R:\LaTeX\MiKTeX\texmfs\install\tex/latex/l3backend\l3backend-xetex.def) (test.aux) (R:\LaTeX\MiKTeX\texmfs\install\tex/latex/base\ts1cmr.fd) (_minted-test/default-pyg-prefix.pygstyle) (_minted-test/default.pygstyle)Python est introuvable. Ex�cutez sans argument pour proc�der � l (_minted-test/EA71F2074989B1673C1B5B01EDA200D266859B547044602182DB085823A77966.pygtex) [1] (test.aux), but the compilation is working.
    – Danks Meme
    Dec 22, 2020 at 15:35
  • and what happens if you call python --help on a command line? Is it found? Dec 22, 2020 at 20:17

1 Answer 1


Fix :

  • Add Python to PATH

  • Go to Settings, App and Features, Execution aliases

  • Disable Python

  • Restart your PC

For checking if it's working :

\write18{python --version}

Thanks to everyone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .