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()
抛出的错误如标题所述:
^{pr2}$由于usetex
设置设置为True
,因此引发错误。如果设置为False
,则不会发生错误。在
我不知道为什么会发生这种情况,我想(不确定)几周前同样的代码也能正常工作。在
添加更多信息:
代码在一行中指出了错误:
exc=exc.output.decode('utf-8')))
重新安装miktex解决了这个问题,尽管发生的原因尚不清楚。在
相关问题 更多 >
编程相关推荐