运行时错误:乳胶无法处理以下字符串:b'$1.0$'

MCVE:


import matplotlib.pyplot as plt

from matplotlib import rc


plt.rc('text', usetex = True)

plt.plot([1.0, 2.0], [3.0, 4.0])

plt.show()

抛出的错误如标题所述:


RuntimeError: latex is not able to process the following string:

b'$1.0$'



Here is the full report generated by latex:




<Figure size 432x288 with 1 Axes>

由于usetex设置设置为 ,会引发错误True。如果设置为False,则不会发生错误。


我不知道为什么会发生这种情况,我认为(不确定)相同的代码在几周前可以正常工作。


添加更多信息:


代码在一行指出错误:


exc=exc.output.decode('utf-8')))


翻翻过去那场雪
浏览 271回答 1
1回答

九州编程

重新安装 miktex 解决了该问题,但发生的原因尚不清楚。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python