I'm using Cent OS i386. I got a error message when I use matplotlib python package.

RuntimeError: LaTeX was not able to process the following string: 'lp'

So, I did yum install tetex. but it still has error.

It seems to I must add the path of LaTeX on python. But, I don't know where is LaTeX directory and which one is added to Python PATH.

Thank you for reading this.

  • Install this: yum install texlive-type1cm. I believe you are missing this package. Or just ensure this it is already installed.
    – m0nhawk
    Sep 4, 2015 at 6:43
  • Welcome to TeX.SX! Sep 4, 2015 at 7:04
  • @m0nhawk Thanks for Comment. But this is call back to me..'No package texlive-type1cm available.' 'Error: Nothing to do'
    – bsjun
    Sep 4, 2015 at 7:46

1 Answer 1


I encountered the same problem. The PATH variable that is set in my shell is correct and included my custom bin dirs, including Latex. However the one "seen" by Python doesn't. Here is what I'm using:

import os
os.environ["PATH"] += os.pathsep + '/usr/local/texlive/2015/bin/x86_64-darwin'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .