The pygment package has been placed in the python folder as well as in the scripts sub-folder within python folder; also added to the PATH; still getting error as below

Request educate how to get over this error

enter image description here

enter image description here

enter image description here



\begin{minted}[mathescape, linenos]{python}

# Note: $\pi=\lim_{n\to\infty}\frac{P_n}{d}$
title = "Hello World"

sum = 0
for i in range(10):
 sum += i




Have added the shell-escape option in the user preferences of ST3

enter image description here

Added pip through python -m ensurepip --default-pip

pip --version shows error still

enter image description here

pip installed now

enter image description here

The ST3 build engine settings as below// ----------------------------------------

// Build engine settings
// ------------------------------------------------------------------

    // OPTION: "builder"
    // Specifies a build engine
    // Possible values:
    // "default" or ""  the default built-in build engine; currently
    //                  this is the same as "traditional"
    // "basic"          invokes pdflatex / xelatex / lualatex as
    //                  needed, then biber / bibtex and pdflatex /
    //                  xelatex / lualatex again if needed. Unlike
    //                  the "simple" builder this supports most of
    //                  LaTeXTools builder features.
    // "script"         external script: invokes the set of commands
    //                  specified in the "script_commands" setting
    //                  in the platform-specific part of the
    //                  "builder_settings"
    // "simple"         invokes pdflatex 1x or 2x as needed, then
    //                  bibtex and pdflatex again if needed;
    //                  intended mainly as a simple example for
    //                  people writing their own build engines.
    // "traditional"    replicates the 'old' system based on
    //                  latexmk (TeXLive) / texify (MiKTeX)
    // custom name      you can also use third-party build engines;
    //                  if so, set the "builder_path" option below
    // NOTE: custom builders CANNOT have the same name as an existing
    // built-in build engine (including "default")

    "builder": "traditional",

    // OPTION: "builder_path"
    // If non-empty, specifies a path to a custom builder, relative to the
    // Sublime Text Packages directory.
    // For instance, "User/builders" (on Windows: "User\builders") is a good
    // choice if you roll your own.
    // (Note: if you choose "User", you may get a Python import error in the
    // console, but things will still work).
    // Leave empty ("") for a built-in builder.

    "builder_path": "",

    // OPTION: "builder_settings"
    // Specify builder-dependent settings and preferences
    // Possible values: see README or documentation provided with
    // third-party build engine.
    // Builder setting can be general or OS-dependent

    "builder_settings" : {

        // General settings:
        // See README or third-party documentation

        // (built-ins): true shows the log of each command in the output panel
        "display_log" : false,
        "options": ["--shell-escape"],

        // Platform-specific settings:
        "osx" : {
            // See README or third-party documentation

        "windows" : {
            // See README or third-party documentation

        "linux" : {
            // See README or third-party documentation

And the log file

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7140 64-bit) (preloaded format=pdflatex 2019.9.14)  19 DEC 2019 20:50
entering extended mode
LaTeX2e <2018-12-01>

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\article.c
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\size10.cl
File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/minted\minted.
Package: minted 2017/07/19 v2.5 Yet another Pygments shim for LaTeX

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\keyva
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/oberdiek\kvopt
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\ltx
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\kvs
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\inf
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\ete
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\ifl
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/fvextra\fvextr
Package: fvextra 2019/02/04 v1.4 fvextra - extensions and patches for fancyvrb

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\ifthen.st
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/etoolbox\etool
Package: etoolbox 2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/fancyvrb\fancy
Package: fancyvrb 2019/01/15
 Style option: `fancyvrb' v3.2a <2019/01/15> (tvz)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/upquote\upquot
Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/lineno\lineno.
Package: lineno 2005/11/02 line numbers on paragraphs v4.41
LaTeX Info: Redefining \\ on input line 3056.
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/tools\calc.sty
Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
LaTeX Info: Redefining \setlength on input line 80.
LaTeX Info: Redefining \addtolength on input line 81.
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/tools\shellesc
Package: shellesc 2016/06/07 v0.02a unified shell escape interface for LaTeX
Package shellesc Info: Unrestricted shell escape enabled on input line 67.
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/ifplatform\ifp
Package: ifplatform 2017/10/13 v0.4a Testing for the operating system

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\pdf
Package: pdftexcmds 2019/07/25 v0.30 Utility functions of pdfTeX for LuaTeX (HO

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\ifp
Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\cat
Package: catchfile 2016/05/16 v1.7 Catch the contents of a file (HO)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/xstring\xstrin
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/generic/xstring\xstr
Package: xstring 2019/02/06 v1.83 String manipulations (CT)
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/framed\framed.
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/float\float.st
Package: float 2001/11/08 v1.3d Float enhancements (AL)
runsystem(if not exist _minted-minted1 mkdir _minted-minted1)...executed.

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/xcolor\xcolor.
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics-cfg\c
File: color.cfg 2016/01/02 v1.6 sample color configuration
Package xcolor Info: Driver file: pdftex.def on input line 225.

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics-def\p
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
runsystem(for ^%i in (pygmentize.exe pygmentize.bat pygmentize.cmd) do set > mi
nted1.aex <nul: /p x=^%~$PATH:i>> minted1.aex)...executed.

runsystem(del minted1.aex)...executed.

\openout1 = `minted1.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.

("C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\tex/context/base/mkii\su
[Loading MPS to PDF converter (version 2006.09.02).]
\openout3 = `minted1.pyg'.

runsystem(pygmentize -l c -f latex -P commandprefix=PYG -F tokenmerge -o _minte
ex minted1.pyg)...executed.

! 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.9 \end{minted}

This could be caused by using -output-directory or -aux-directory 
without setting minted's outputdir, or by using a build tool that 
changes paths in ways minted cannot detect, 
or using frozencache with a missing file.

runsystem(del minted1.pyg)...executed.

Here is how much of TeX's memory you used:
 4490 strings out of 492895
 83203 string characters out of 3121865
 192124 words of memory out of 3000000
 8376 multiletter control sequences out of 15000+200000
 3640 words of font info for 14 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 37i,1n,35p,840b,142s stack positions out of 5000i,500n,10000p,200000b,50000s

No pages of output.
PDF statistics:
 0 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)


After following the details at https://alipourmousavi.com/blog/index.php/2018/02/08/using-minted-package-in-latex-to-format-codes/

PATH is set and shown below\Pygments installed\wheel also done\setuptools done\

Path=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Pandoc\;C:\Users\J S Bibra\AppData\Local\Microsoft\WindowsApps;C:\Users\J S Bibra\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\;C:\Users\J S Bibra\AppData\Local\GitHubDesktop\bin;C:\Python38;C:\Python38\Scripts;C:\Python38\Scripts\Pygments-2.5.2;C:\Users\J S Bibra\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\J S Bibra\AppData\Local\Programs\Python\Python38;C:\Users\J S Bibra\AppData\Local\Programs\Python
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules

following error

 Package minted Error: Missing Pygments output; \inputminted was [\end{minted}]

the code used



import numpy as np

def incmatrix(genl1,genl2):
    m = len(genl1)
    n = len(genl2)
    M = None #to become the incidence matrix
    VT = np.zeros((n*m,1), int)  #dummy variable

    #compute the bitwise xor matrix
    M1 = bitxormatrix(genl1)
    M2 = np.triu(bitxormatrix(genl2),1) 

    for i in range(m-1):
        for j in range(i+1, m):
            [r,c] = np.where(M2 == M1[i,j])
            for k in range(len(r)):
                VT[(i)*n + r[k]] = 1;
                VT[(i)*n + c[k]] = 1;
                VT[(j)*n + r[k]] = 1;
                VT[(j)*n + c[k]] = 1;

                if M is None:
                    M = np.copy(VT)
                    M = np.concatenate((M, VT), 1)

                VT = np.zeros((n*m,1), int)

    return M

Any advise please?

Am also seeing Unrestricted shell escape

enter image description here

The error message in lo file

enter image description here

  • Are you compiling document with --shell-escape argument? Dec 19, 2019 at 6:42
  • yessir please see edit above--added shell escape to ST3 user settings
    – js bibra
    Dec 19, 2019 at 12:23

2 Answers 2


Pygmentize requires Python also, please install the latest version and install the Pygmentize then run your file, your code works fine for me...

Note that you have to run LaTeX or PDFLaTeX through -shell-escape option...


enter image description here

  • yesssir please tell me how-- I have installed python 3.8 please see screenshot above--also added pygments folder in python>scripts and in python folder above--also added to the PATH--shell escape option added in ST3 user settings--please see screenshot above and advise further--thanks
    – js bibra
    Dec 19, 2019 at 12:26
  • Can you confirm that whether you just add the pygments or you installed?
    – MadyYuvi
    Dec 19, 2019 at 12:35
  • Also you should install and update those things in Admin rights...
    – MadyYuvi
    Dec 19, 2019 at 12:36
  • request details how to install pygments--admin rights
    – js bibra
    Dec 19, 2019 at 12:45
  • 1
    Ok, another (more quirky) reason might be that you have whitespace ( "j s bibra" in your filepath. I had the same issue (I have non-ASCII letters in username on one of my PCs). Consider reinstalling python directly into "C:\python" or simillar, to have only ASCII letters in your path. It solved my situation. Dec 20, 2019 at 18:24


Got minted to work with the help of --


The solution was to enter the path--

"texpath" : "C:/Users/J S Bibra/AppData/Local/Programs/Python/Python38/Scripts",

in the ST3>Preferences>Package Settings>LatexTools>Settings-User>Platform Settings

enter image description here

Running the code



\begin{minted}[mathescape, linenos]{python}

# Note: $\pi=\lim_{n\to\infty}\frac{P_n}{d}$
title = "Hello World"

sum = 0
for i in range(10):
 sum += i



gave the magic much awaited output

enter image description here

Much thanks to @guilgautier at https://github.com/SublimeText/LaTeXTools/issues/657#issuecomment-414410430

Over and Out

CLOSED Question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.