[英]Why does Manim meet problems with latex
我正在嘗試運行非常基本的 Latex 但我遇到了錯誤。 有人知道如何解決嗎?
代碼:
from manimlib import *
class TexTransformExample(Scene):
def construct(self):
munis=Tex(r'\munis')
self.add(munis)
這是錯誤
'latex' 不是內部或外部命令,也不是可運行的程序或批處理文件。 錯誤:根:
乳膠錯誤! 不用擔心,它發生在我們中最好的人身上。
回溯(最近一次調用):文件“C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\runpy.py”,第 197 行,在 _run_module_as_main 中 return run_code(code, main_globals, None, File " C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\\Users\\Alek\\AppData\\Local\\Programs\\ Python\\Python39\\Scripts\\manimgl.exe_ main .py”,第 7 行,在文件“C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\manimlib_ main .py”中,行17、在主scene.run()文件“C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\manimlib\\scene\\scene.py”的第75行,在run self.構造()文件“1.py”,第4行,在構造munis=Tex(“{{x}}”)文件“C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-包\\manimlib\\mobject\\svg\\tex_mobject.py", line 163, in init super(). init (full_string, **kwargs) File "C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib \\site-packages\\manimlib\\mobject\\svg\\tex_mobjec t.py”,第 42 行,在初始化文件名 = tex_to_svg_file(full_tex) 文件“C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\manimlib\\utils\\tex_file_writing.py”中,第 52 行,在 tex_to_svg_file tex_to_svg(tex_file_content, svg_file) 文件“C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\manimlib\\utils\\tex_file_writing.py”,第 60 行,在 tex_to_svg svg_file = dvi_to_svg(tex_to_dvi(tex_file)) 文件“C:\\Users\\Alek\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\manimlib\\utils\\tex_file_writing.py”,第 94 行,在 tex_to_dvi 中打開(log_file, "r") as file: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Alek\\AppData\\Local\\Temp\\Tex\\7623af840f03027e.log'
嘗試安裝 Windows MikTex 發行版:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.