Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package minted Error: minted v3+ executable is not installed #1538

Open
hair-splitter opened this issue Oct 20, 2024 · 2 comments
Open

Package minted Error: minted v3+ executable is not installed #1538

hair-splitter opened this issue Oct 20, 2024 · 2 comments

Comments

@hair-splitter
Copy link

My system:

  • Windows 11
  • MiKTeX 24.4 (packages update: 2024-10-20)
  • Python 3.11 + Pygments 2.18.0

I tried to compile the following code:

\documentclass{article}
\usepackage{minted}

\begin{document}

\begin{minted}{latex}
\textbf{Hello, World!}
\end{minted}

\end{document}

The compilation gives the following error message:

! Package minted Error: minted v3+ executable is not installed or is not added to PATH.

If I load the minted2 package instead of minted, there is no such problem.

@muzimuzhi
Copy link

minted v3 ships with a new executable latexminted written in Python. (As minted requires Python library pygments, no new dependency is added.)

But currently the Python scripts and wheels are only included in minted__source MiKTeX package, not in minted package.

image

A workaround is to install latexminted from pip and compile tex files with shell escape enabled, but then another error (probably minted is to blame) is raised, see gpoore/minted#401 (comment).

[error] Traceback (most recent call last):
[error]   File ".../venv/lib/python3.13/site-packages/latexrestricted/_restricted_pathlib.py", line 647, in writable_file
[error]     return self._writable_file_cache[self.cache_key]
[error]            ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
[error] KeyError: (<class 'latexrestricted._restricted_pathlib.ResolvedRestrictedPath'>, ResolvedRestrictedPath('/Users/me/.latexminted_config'))
[error] During handling of the above exception, another exception occurred:
...
[error] latexrestricted.err.LatexConfigError: Environment variable TEXSYSTEM="miktex", but failed to find an "initexmf" executable with accompanying "kpsewhich" on PATH

@gpoore
Copy link

gpoore commented Oct 29, 2024

Under macOS, kpsewhich is apparently a symlink to miktex-kpsewhich. I've just released latexrestricted v0.6.0, which adds support for miktex-kpsewhich. This should fix the other error. I will release a new version of minted that bundles latexrestricted v0.6.0 later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants