Minted package: "python: not found" error
When using the minted LaTeX package, an error of this kind may appear in the logs:
(./out/_minted-testing-exercises-without-solutions/trac.pygstyle)sh: 1: python: not found
system returned with code 32512
Error: cannot read infile: [Errno 2] No such file or directory: 'out/testing-exercises-without-solutions.pyg'
system returned with code 256
! Package minted Error: Missing Pygments output; \inputminted was
probably given a file that does not exist--otherwise, you may need
the outputdir package option, or may be using an incompatible build tool,
or may be using frozencache with a missing file.
See the minted package documentation for explanation.
Type H <return> for immediate help.
...
l.10 \end{exercise}
?
The most interesting part is python: not found. It seems that for some reason minted sometimes directly calls the python executable. And in this Docker image, only the python3 executable is installed, not python. In other words, an alias is missing to redirect python to python3. In Debian, this alias can be installed using the python-is-python3 deb package.
Therefore, I've solved the problem by adding these lines at the beginning of my compilation script:
apt-get update
apt-get install -y python-is-python3
Would you consider adding python-is-python3 to your Docker image to solve future similar problems?