I am using TeXworks on Mac osX 10.7.5 and I'm trying to compile some python code within my tex file but with limited success.
My tex file looks like:
\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}
When I run the tex file with the command:
pdflatex --shell-escape path.tex
I get the following error:
! Package minted Error: You must have `pygmentize' installed to use this packag
e.
The strange thing is, when I run the command, then type "quit". The PDF is produced as expected but how can I get it to produce the file without the error?
I have installed the latest version of minted and pygments. The terminal finds pygmentize:
ucbthsa-2:bin ucbthsa$ which pygmentize
/Library/Frameworks/Python.framework/Versions/Current/bin/pygmentize
I have had a look at another similar question but it has not helped
/usr/local/bin/pygmentize; how did you install it? – egreg Feb 10 '14 at 14:25echo $PATH? – egreg Feb 10 '14 at 14:31/Users/ucbthsa/tcoffee/Version_9.03.r1318/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin:/usr/X11R6/bin– Harpalss Feb 10 '14 at 14:40/Library/...later in$PATH? – egreg Feb 10 '14 at 14:41/Library/...at the top and see if it works – egreg Feb 10 '14 at 16:29