目录
前言
在使用 matplotlib 库进行绘图时,使用了Latex的语法,故需安装Latex工具。
Latex简介:
LATEX为TEX基础上的一套格式,令作者能够使用预定义的专业格式以较高质量排版和印刷他们的作品。LATEX使用TEX程序作为自己的排版引擎。
TEX简介:
TEX是高德纳(Donald E.Knuth)开发的、以排版文字和数学公式为目的的一个计算机软件。TEX以其卓越的稳定性、跨平台、几乎没有Bug而著称。TEX的版本号不断趋近于π。
我的环境:
CentOS 8
python 3.8
matplotlib 3.7.1
YUM安装命令
使用yum进行安装:
sudo yum -y install texlive texlive-latex texlive-xetex
sudo yum -y install texlive-collection-xetex
如果还不行在安装:
sudo yum -y install texlive-collection-latex
sudo yum -y install texlive-collection-latexrecommended
sudo yum -y install texlive-xetex-def
PYTHON安装命令
pip install latex
我的安装版本
日期:2023-5-27
latex(python): 0.7.0
texlive库(大部分):20180414 【这个库安装了好多,这个是总体上的版本日期】
其他
我的方法成功解决了我的问题,但是可能并不适用于所有问题,如果需要卸载以上安装的内容可以使用以下指令:
YUM:
sudo yum remove texlive texlive-latex texlive-xetex
sudo yum remove texlive-collection-latex
sudo yum remove texlive-collection-latexrecommended
sudo yum remove texlive-xetex-def
sudo yum remove texlive-collection-xetex
PYTHON:
pip uninstall latex