manim
manim copied to clipboard
LaTeX/ManimGL error while launching
I'm trying to launch the first example scene and everything else works but LaTeX. I get these cramped words, no further animation and an error.

Code:
from manimlib import * import numpy as np
class OpeningManimExample(Scene): def construct(self): intro_words = Text(""" The original motivation for manim was to better illustrate mathematical functions as transformations. """) intro_words.to_edge(UP)
self.play(Write(intro_words))
self.wait(2)
# Linear transform
grid = NumberPlane((-10, 10), (-5, 5))
matrix = [[1, 1], [0, 1]]
linear_transform_words = VGroup(
Text("This is what the matrix"),
IntegerMatrix(matrix, include_background_rectangle=True),
Text("looks like")
)
linear_transform_words.arrange(RIGHT)
linear_transform_words.to_edge(UP)
linear_transform_words.set_stroke(BLACK, 10, background=True)
self.play(
ShowCreation(grid),
FadeTransform(intro_words, linear_transform_words)
)
self.wait()
self.play(grid.animate.apply_matrix(matrix), run_time=3)
self.wait()
# Complex map
c_grid = ComplexPlane()
moving_c_grid = c_grid.copy()
moving_c_grid.prepare_for_nonlinear_transform()
c_grid.set_stroke(BLUE_E, 1)
c_grid.add_coordinate_labels(font_size=24)
complex_map_words = TexText("""
Or thinking of the plane as $\\mathds{C}$,\\\\
this is the map $z \\rightarrow z^2$
""")
complex_map_words.to_corner(UR)
complex_map_words.set_stroke(BLACK, 5, background=True)
self.play(
FadeOut(grid),
Write(c_grid, run_time=3),
FadeIn(moving_c_grid),
FadeTransform(linear_transform_words, complex_map_words),
)
self.wait()
self.play(
moving_c_grid.animate.apply_complex_function(lambda z: z**2),
run_time=6,
)
self.wait(2)
Error:
PS C:\Users\Ab> cd manim PS C:\Users\Ab\manim> manimgl example_scenes.py OpeningManimExample Warning: Using the default configuration file, which you can modify in c:\users\Ab\manim\manimlib\default_config.yml If you want to create a local configuration file, you can create a file named custom_config.yml, or run manimgl --config ERROR:root:left[\begin{array}{c}\quad \\quad \\end{array}\right]"
LaTeX Error! Not a worry, it happens to the best of us.
Traceback (most recent call last):
File "C:\Users\Ab\AppData\Local\Programs\Python\Python39\Scripts\manimgl-script.py", line 33, in
I've changes username here, but it is valid(only latin letters).
I'm using
- Windows 10
- Python 3.9.6.
- Newest ManimGL (cloned from this GitHub)
- basic MikTex (6/8/2021)
- all other necessary things (ffmpeg etc.)
I just solved this problem. Configure the yml file c:\users\Ab\manim\manimlib\default_config.yml that you reported error and add an absolute path to ”directories“.
中文
Windows解决方案
- 1.在C盘创建TempLatex(具体什么名字按你的喜好来)目录
- 2.在manim(manimgl版本)目录中找到manimlib/default_config.yml并使用文本编辑器打开
- 3.修改第18行 之前:temporary_storage: "" 之后:temporary_storage: "C:/TempLatex"
- 4.保存
English
Windows Solution
- 1.Create TempLatex directory in C drive
- 2.Find manimlib/default_config.yml in the manim (manimgl version) directory and open it with a text editor
- 3.Modify line 18: before: temporary_storage: "" after: temporary_storage: "C:/TempLatex "
- 4.Save
中文
Windows解决方案
* 1.在C盘创建TempLatex(具体什么名字按你的喜好来)目录 * 2.在manim(manimgl版本)目录中找到manimlib/default_config.yml并使用文本编辑器打开 * 3.修改第18行 之前:**temporary_storage: ""** 之后:**temporary_storage: "C:/TempLatex"** * 4.保存English
Windows Solution
* 1.Create TempLatex directory in C drive * 2.Find manimlib/default_config.yml in the manim (manimgl version) directory and open it with a text editor * 3.Modify line 18: before: **temporary_storage: ""** after: **temporary_storage: "C:/TempLatex "** * 4.Save
Very good. It solved the problem.
https://github.com/3b1b/manim/issues/1606#issuecomment-1024893343
After I changed the default_ config. yml, the system reported an error.
'manimgl' is not recognized as an internal or external command,operable program or batch file.
when I use pip install manimgl,the system said: 'pip' is not recognized as an internal or external command,
operable program or batch file.
Hey everyone! If your system reported an error after you changed the default_ config. yml,you should use Path.
But...
'latex' is not recognized as an internal or external command,
operable program or batch file.
ERROR LaTeX Error! Not a worry, it happens to the best of us. tex_file_writing.py:90
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310-32\Scripts\manimgl-script.py", line 33, in
'latex' is not recognized as an internal or external command,
notice 'latex' is not recognized as an internal or external command, that means you haven't installed LaTeX properly.
@TonyCrane Thanks.