[异常]Failed to process string with tex because latex could not be found

在Anaconda环境下使用jupyter notebook时遇到RuntimeError,提示latex无法找到。通过安装jupyter_latex_envs包并按照官方指南操作,成功解决了plt.text()函数的异常,现在可以正常添加文字并探索其用法。
摘要由CSDN通过智能技术生成

环境:anaconda
使用jupyter notebook尝试plt.text()报出异常:RuntimeError: Failed to process string with tex because latex could not be found

尝试解决方法:
pip install latex
安装成功

运行仍旧报出该异常。

到anaconda的官方网站搜索,找到答案
https://anaconda.org/conda-forge/jupyter_latex_envs
按照步骤:
conda install -c conda-forge jupyter_latex_envs
conda install -c conda-forge/label/cf201901 jupyter_latex_envs
conda install -c conda-forge/label/cf202003 jupyter_latex_envs
成功后,问题得到解决。

import matplotlib.pyplot as plt
fig = plt.figure()
plt.axis([0, 10
  • 19
    点赞
  • 36
    收藏
    觉得还不错? 一键收藏
  • 14
    评论
评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值