我的电脑是 Windows 10 64bit,我在 2019 年 6 月左右(一两周前)从 git 安装了 python 3.7.3 32bit,MikTex 2.9 32bit,manim master 和其他依赖项,终于可以成功运行 SquareToCircle。
但是,当我将 makeText 类添加到 example_scenes.py 并运行如下:
class makeText(Scene):
def construct(self):
first_line = TextMobject("Manim is fun")
second_line = TextMobject("and useful")
second_line.next_to(first_line, DOWN)
self.wait(1)
self.play(Write(first_line), Write(second_line))
在 windows 命令行窗口中发出以下命令:
c:\software\manim>python -m manim example_scenes.py makeText -pl
异常弹出:
Media will be written to ./media\. You can change this behavior with the --media_dir flag.
Traceback (most recent call last):
File "C:\software\manim\manimlib\extract_scene.py", line 150, in main
scene = SceneClass(**scene_kwargs)
File "C:\software\manim\manimlib\scene\scene.py", line 52, in __init__
self.construct()
File "example_scenes.py", line 90, in construct
first_line = TextMobject("Manim is fun")
File "C:\software\manim\manimlib\mobject\svg\tex_mobject.py", line 144, in __init__
self, self.arg_separator.join(tex_strings), **kwargs
File "C:\software\manim\manimlib\mobject\svg\tex_mobject.py", line 44, in __init__
self.template_tex_file_body
File "C:\software\manim\manimlib\utils\tex_file_writing.py", line 19, in tex_to_svg_file
dvi_file = tex_to_dvi(tex_file)
File "C:\software\manim\manimlib\utils\tex_file_writing.py", line 67, in tex_to_dvi
"See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: ./media\Tex\6b85ca5665e2f414.log
实际上,我找不到 6b85ca5665e2f414.log,但找不到 6b85ca5665e2f414.tex 和 6b85ca5665e2f414.pdf。
任何人都可以帮助我,谢谢!
===============================================
更新(2019 年 6 月 28 日):做了一些调试,发现下面的代码导致了异常(tex_file_writing.py 的第 61 行):
exit_code = os.system(" ".join(commands))
exit_code 为 1,命令以“latex....”开头