title: TeX in matplotlib on Mac OS X and TeX Live
body: <p>I have the following Hello World code to try out TeX rendering with matplotlib on my Mac.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from matplotlib import rc
  
  rc('text', usetex=True)
  rc('font', family='serif')
  
  plt.text(2,2,r"Hello World!")
  plt.show()
  </code></pre>
  
  <p>With that code, I'd get the following error:</p>
  
  <pre><code>sh: latex: command not found
  Exception in Tkinter callback
  &lt;... a long Traceback here ...&gt;
  RuntimeError: LaTeX was not able to process the following string:
  'lp'
  Here is the full report generated by LaTeX:
  </code></pre>
  
  <p>I don't see any kind of full report after the last line. Anyway, I think this is a path problem. Some pointers on how I could fix it? I have TeX Live 2010.</p>
  
  <p>I tried adding <code>/Library/TeX/Root/bin/universal-darwin</code> to the Global Python Path of the Project Properties, but I still get the same errors.
  <img src="https://i.stack.imgur.com/IxDah.png" alt="enter image description here"></p>