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

Minted fail with Miktex #428

Open
hjenryin opened this issue Dec 27, 2024 · 3 comments
Open

Minted fail with Miktex #428

hjenryin opened this issue Dec 27, 2024 · 3 comments

Comments

@hjenryin
Copy link

Hi! I'm having some trouble to run minted with my miktex. I've read #419, which seems related, but doesn't help as the cases mentioned there doesn't really match my case.
The error is the same though:

Package minted Error: minted v3+ executable is not installed, is not added to
 PATH, or is not permitted with restricted shell escape; or MiKTeX is being use
d with -aux-directory or -output-directory without setting a TEXMF_OUTPUT_DIREC
TORY environment variable.

And here are some information that may be helpful:

$ miktex --version
One MiKTeX Utility 1.9 (MiKTeX 24.1)

This should rule out the possibility of minted not installed / added to PATH:

$ latexminted --version
latexminted 0.3.2
Python executable for the LaTeX minted package
Libraries: latex2pydata 0.4.1, latexrestricted 0.6.2, pygments 2.18.0

This should rule out the necessity for shell escape:

$ initexmf --show-config-value=[core]AllowedShellCommands[]                                                           
miktex-bibtex;miktex-bibtex8;miktex-epstopdf;miktex-gregorio;miktex-kpsewhich;miktex-makeindex;bibtex;bibtex8;extractbb;findtexmf;gregorio;kpsewhich;makeindex;memoize-extract.pl;memoize-extract.py;texosquery-jre8;latexminted

And I'm running with $ pdflatex .\nt.tex, which make TEXMF_OUTPUT_DIRECTORY irrelevant
TORY environment variable.

I wonder what the problem could be. Or are there any more logs that could be helpful for tracking down the problem?
Thank you so much!

@gpoore
Copy link
Owner

gpoore commented Dec 27, 2024

I'd suggest updating MiKTeX to start with. Some of the changes since 24.1 affect shell escape under some circumstances.

@hjenryin
Copy link
Author

After updating, the error persists. Do you have any further suggestions? Thanks!

$ miktex --version
One MiKTeX Utility 1.10 (MiKTeX 24.4)

@gpoore
Copy link
Owner

gpoore commented Dec 28, 2024

  • You could compile a simple document with just a single minted command or environment, and post the document plus complete log here.
  • If you're using an editor to compile, you might try using the command line instead, since sometimes editors modify PATH.
  • You could try something like \input{|"where latexminted"} (needs MiKTeX --enable-pipes) to see whether the document can correctly find latexminted, but then latexminted or minted is failing in some way.

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

2 participants