Manim

raw JSON →
0.20.1 verified Mon Apr 27 auth: no python

Manim (Mathematical Animation Engine) is a Python library for creating explanatory math videos and animations. Current version is 0.20.1 with monthly releases. Requires Python 3.11+.

pip install manim
error manim error: No module named 'manim'
cause Manim not installed or wrong Python environment.
fix
Run pip install manim in your Python environment.
error AttributeError: 'Scene' object has no attribute 'play'
cause Scene.construct method must call self.play(). This error occurs if you misspell `construct` or omit it.
fix
Ensure your scene class has a construct method (not __init__).
error ManimError: No available writer found
cause FFmpeg not installed or not in PATH.
fix
Install FFmpeg from https://ffmpeg.org/ and add it to your system PATH.
breaking Manim version 0.19.0 changed the default renderer to OpenGL. If you upgrade from an older version, scenes may look different.
fix Use the CairoRenderer if you need the old behavior: manim -r cairo your_scene.py
deprecated The 'TexTemplate' class has been deprecated in favor of 'TexTemplateFromFile' in v0.18.0.
fix Replace `TexTemplate` with `TexTemplateFromFile` or use the new `tex_template` parameter.
gotcha When using LaTeX (Text, Tex, MathTex), you need a working LaTeX distribution installed (e.g., MiKTeX or TeX Live).
fix Install a LaTeX distribution or use the `–-tex_template` flag to point to a custom template.

A minimal scene that shows a square.

from manim import Scene, Square, config
config.frame_height = 8
config.frame_width = 8

class ExampleScene(Scene):
    def construct(self):
        square = Square()
        self.play(Create(square))
        self.wait(1)