title: matplotlib: latex: savefig: OSError no such file or directory
body: <p>I am generating some png figures with <code>python 2.7.3</code> and <code>Agg</code> backend and using the options:</p>
  
  <pre><code>matplotlib.rc('font', family = 'serif', serif = 'cm10', size = 19)
  matplotlib.rc('text', usetex = True)
  matplotlib.rcParams['text.latex.preamble'] = [r'\boldmath']
  matplotlib.rcParams['font.weight']         = 'bold'
  matplotlib.rcParams['axes.linewidth']      = 2
  </code></pre>
  
  <p>for the labels and titles in the figures. the code works fine when I run it on my cluster on a login node. When I submit it to a computing node I get </p>
  
  <pre><code> Traceback (most recent call last):
     File "main.py", line 312, in &lt;module&gt;
       main()
     File "plotvoigt.py", line 97, in main
       plt.savefig(savefilename, format = 'png')
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/pyplot.py", line 696, in savefig
       res = fig.savefig(*args, **kwargs)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/figure.py", line 1563, in savefig
       self.canvas.print_figure(*args, **kwargs)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2232, in print_figure
       **kwargs)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 527, in print_png
       FigureCanvasAgg.draw(self)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 474, in draw
       self.figure.draw(self.renderer)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/artist.py", line 62, in draw_wrapper
       draw(artist, renderer, *args, **kwargs)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/figure.py", line 1159, in draw
       func(*args)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/artist.py", line 62, in draw_wrapper
       draw(artist, renderer, *args, **kwargs)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2319, in draw
       a.draw(renderer)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/artist.py", line 62, in draw_wrapper
       draw(artist, renderer, *args, **kwargs)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/axis.py", line 1110, in draw
       renderer)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/axis.py", line 1060, in _get_tick_bboxes
       extent = tick.label1.get_window_extent(renderer)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/text.py", line 961, in get_window_extent
       bbox, info, descent = self._get_layout(self._renderer)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/text.py", line 352, in _get_layout
       ismath=False)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 229, in get_text_width_height_descent
       renderer=self)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/texmanager.py", line 678, in get_text_width_height_descent
       page = next(iter(dvi))
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/dviread.py", line 89, in __iter__
       have_page = self._read()
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/dviread.py", line 150, in _read
       self._dispatch(byte)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/dviread.py", line 233, in _dispatch
       self._fnt_def(k, c, s, d, a, l, n)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/dviread.py", line 388, in _fnt_def
       tfm = _tfmfile(fontname)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/dviread.py", line 897, in _tfmfile
       return _fontfile(texname, Tfm, '.tfm', _tfmcache)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/dviread.py", line 887, in _fontfile
       filename = find_tex_file(texname + suffix)
     File "/path/Python/2.7.3/lib/python2.7/site-packages/matplotlib/dviread.py", line 868, in find_tex_file
       stderr=subprocess.PIPE)
     File "/path/Python/2.7.3/lib/python2.7/subprocess.py", line 679, in __init__
       errread, errwrite)
     File "/path/Python/2.7.3/lib/python2.7/subprocess.py", line 1249, in _execute_child
       raise child_exception
   OSError: [Errno 2] No such file or directory
  </code></pre>
  
  <p>but then if I remove these matplotlib options and I remove the labels the figures are saved on the computing node without a problem. </p>
  
  <p>How can I use latex for typesetting the figures on the computing node?</p>