繁体   English   中英

乳胶失效ipython daft matplotlib

[英]latex failure ipython daft matplotlib

我很想尝试daft( http://daft-pgm.org/ ),通过它我发现乳胶功能在matplotlib中不起作用。

我将示例粘贴到daft网站上( http://daft-pgm.org/examples/nocircles/ ):

from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)

import daft

pgm = daft.PGM([3.6, 2.4], origin = [1.15, 0.8], node_ec="none")
pgm.add_node(daft.Node("cloudy", r"cloudy", 3, 3))
pgm.add_node(daft.Node("rain", r"rain", 2, 2))
pgm.add_node(daft.Node("sprinkler", r"sprinkler", 4, 2))
pgm.add_node(daft.Node("wet", r"grass wet", 3, 1))
pgm.add_edge("cloudy", "rain")
pgm.add_edge("cloudy", "sprinkler")
pgm.add_edge("rain", "wet")
pgm.add_edge("sprinkler", "wet")
pgm.render()
pgm.figure.savefig("nocircles.pdf")
pgm.figure.savefig("nocircles.png", dpi=150)

这就是ipython回归给我的

RuntimeError: LaTeX was not able to process the following string:  
'lp'
Here is the full report generated by LaTeX: 

没有ipython或LaTex提供的报告。 看截图:

在此输入图像描述

matplotlib网站上的标准脚本给出了同样的错误。 有没有办法检查是否满足所有依赖项? LaTex安装在我的系统上,但我不确定ipython是否可以访问它。

在我的情况下,它是一个需要安装的LaTex库(抱歉,我没注意哪一个)

它自动打开我的MikTex安装程序,所以你安装了建议的库,你应该完成。

不需要从命令行访问“lp”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM