I am using texmaker on a Mac and I tired to use the minted package with this code
\documentclass[12pt,A4]{article}
\usepackage{minted}
\begin{document}
\begin{minted}{python}
def __init__(self, x, y):
self.x=x
self.y=y
\end{minted}
\end{document}
but when compiling my code I get the following error:
! Package minted Error: You must have `pygmentize' installed to use this package
However I actually did install the package as described using
sudo easy_install Pygments
I even tried restarting. Still getting the same error.
I really don't see how to fix this error, can someone help me?
When creating the pdf as suggested by egreg the resulting pdf looks like this:
/Library/Frameworks/Python.framework/Versions/2.7/bin
/opt/local/bin
/opt/local/sbin
/opt/local/bin
/opt/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/texbin
/usr/X11/bin
Is there pygmentize?
/Library/Frameworks/Python.framework/Versions/2.7/bin/pygmentize
Judging from that there is Pygmentize on my mac?!
pygmentize
in your$PATH
? Open a terminal and try whetherpygmentize
is resolved. If not, locate it on your hard drive and set the$PATH
accordingly. That may resolve your problem.listings
package./Library/Python and pygmentize
is here :/usr/local/bin/pygmentize
. Perhaps you can create a symbolic link into /usr/local/bin/. I don't work with/opt
(macport) because we get always this kind of problem !pygmentize
is in/usr/local/bin