异常
RuntimeError: Failed to process string with tex because latex could not be found
场景
使用matplotlib
调用latex
生成pdf
时报错
解决方法
安装latex
和dvipng
pip install latex
sudo apt-get install dvipng
sudo apt-get install -y texlive texlive-latex-extra texlive-latex-recommended texlive-fonts-recommended
安装latex
时不要用conda
用pip
后续报错
如果你按照上面的教程仍然报错,是下面这种
- RuntimeError: latex was not able to process the following string: b‘lp‘
- ! LaTeX Error: File `type1ec.sty’ not found.
那么你执行安装下面一个包就行
sudo apt-get install cm-super