Windows环境下Anaconda jupyter中调用matplotlib使用latex报错
异常产生场景:
plt.rc('text', usetex=True)
plt.rc('font', size=15); N = [6, 8, 10]
plt.plot(x0, yx(x0))
提示找不到latex或缺失XXX字体文件
RuntimeError: Failed to process string with tex because latex could not be found
原因
缺失latex环境
解决办法
在conda中安装miktex
conda install -c conda-forge miktex
未安装成功因为XXX文件已存在?
将原有miktex卸载干净后重新尝试