TeX в matplotlib на Mac OS X и TeX Live

У меня есть следующий код Hello World, чтобы опробовать TeX-рендеринг с matplotlib на моем Mac.

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()

С этим кодом я бы получил следующую ошибку:

sh: latex: command not found
Exception in Tkinter callback
<... a long Traceback here ...>
RuntimeError: LaTeX was not able to process the following string:
'lp'
Here is the full report generated by LaTeX:

Я не вижу никаких полный отчет после последней строки. В любом случае, я думаю, что это проблема пути. Несколько советов о том, как я могу это исправить? У меня TeX Live 2010.

Я попытался добавить / Library / TeX / Root / bin / universal-darwin в глобальный путь Python в свойствах проекта, но все равно получаю те же ошибки. enter image description here

12
задан Kit 21 May 2011 в 14:00
поделиться