Skip to content

Manim: make math animations with Python

Updated 2026-11-06

Manim is a free, MIT-licensed Python library for explanatory animation: graphs, shapes, formulas and text that move. You write a scene as a Python class and render it to an MP4 with one command. The clip below is a real render of the code on this page.

Real: 7 seconds at 1920x1080 and 30 fps, rendered with Manim Community 0.22.1 in about 8 seconds on a 4-core Linux computer (92 KB for the web). Made by Glidezo, not by the Manim team.

Glidezo isn't connected to Manim. We don't run Manim on this site, and our own skills use HyperFrames. This page is what we read and ran on 2026-11-06.

Two Manims: Community and ManimGL

Searching "manim python" finds two projects with the same name. Pick one and follow only its docs: their code isn't fully compatible.

Manim CommunityManimGL
Packagemanimmanimgl
Made byThe Manim Community, forked in 2020Grant Sanderson (3Blue1Brown)
Latest release0.22.1, October 27, 20261.7.2, December 13, 2024
Python3.11 or newer3.10 or newer (its README)
GitHub starsAbout 42,000About 96,000
LicenceMITMIT

ManimGL's own README calls the community edition "more stable, better tested". For most people, especially beginners, Manim Community is the one to start with, and it's what we used.

How to install Manim

Manim's docs recommend uv, a Python project tool:

uv init manimations
cd manimations
uv add manim
uv run manim checkhealth

Manim draws with Cairo and Pango, so some systems need those first:

  • macOS: brew install cairo pkg-config
  • Debian and Ubuntu: sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev, plus pkg-config
  • Windows: the docs say you may need Microsoft's C++ Build Tools.

What happened when we tried: on our Linux computer, without those packages, uv add manim failed after 5 seconds with "Dependency lookup for cairo with method 'pkg-config' failed". On PyPI, the Cairo and Pango bindings Manim needs have ready-built files for Windows and macOS only, so Linux builds them from source. We didn't install the system packages; we used Manim's official Docker image instead, which has everything, including a small LaTeX:

docker run --rm --user="$(id -u):$(id -g)" -v "$PWD:/manim" \
  manimcommunity/manim:v0.22.1 manim -qh --fps 30 scene.py GraphDemo

The image is a 532 MB download and 2 GB on disk. FFmpeg isn't needed: since version 0.19.0 Manim writes video through the PyAV library. LaTeX is only for typeset formulas (MathTex); plain Text works without it.

The scene we rendered

A title, a pair of axes, y = sin(x) drawn on, and a dot that runs along the curve. Save it as scene.py:

"""Manim demo for glidezo.com/manim: a sine graph drawn on axes with a dot that follows it.

Uses Text (Pango) only, so no LaTeX is needed.
Render: manim -qh --fps 30 scene.py GraphDemo   (1920x1080, 30 fps; -qh alone is 1080p60)
"""

from manim import (
    DOWN,
    UP,
    Axes,
    Create,
    Dot,
    FadeIn,
    FadeOut,
    Scene,
    Text,
    ValueTracker,
    Write,
    always_redraw,
    config,
    linear,
    np,
)

BG = "#0a0a0b"
FG = "#f4f4f5"
ACCENT = "#8b7bff"
MUTED = "#71717a"
# Noto Sans ships in the official Docker image; Pango falls back to another font if it is missing.
FONT = "Noto Sans"

config.background_color = BG


class GraphDemo(Scene):
    def construct(self) -> None:
        title = Text("Manim: math animation in Python", font=FONT, font_size=44, color=FG)
        title.to_edge(UP, buff=0.5)

        axes = Axes(
            x_range=[0, 2 * np.pi, np.pi / 2],
            y_range=[-1.5, 1.5, 0.5],
            x_length=10,
            y_length=4.5,
            axis_config={"color": MUTED, "stroke_width": 2, "include_ticks": True},
            tips=False,
        ).shift(DOWN * 0.4)

        graph = axes.plot(np.sin, x_range=[0, 2 * np.pi], color=ACCENT, stroke_width=6)
        label = Text("y = sin(x)", font=FONT, font_size=32, color=ACCENT).next_to(axes.c2p(np.pi / 2, 1), UP, buff=0.3)

        t = ValueTracker(0)
        dot = always_redraw(
            lambda: Dot(axes.c2p(t.get_value(), np.sin(t.get_value())), radius=0.12, color=FG)
        )

        self.play(Write(title), run_time=1.0)
        self.play(Create(axes), run_time=1.0)
        self.play(Create(graph), FadeIn(label), run_time=1.5)
        self.add(dot)
        self.play(t.animate.set_value(2 * np.pi), run_time=2.5, rate_func=linear)
        self.wait(0.5)
        self.play(FadeOut(dot), run_time=0.5)

Rendered at 1920x1080 and 30 fps, it took 7.7 to 8.5 seconds (3 runs) on a 4-core Linux computer with no GPU, and made a 168 KB file. Watch the flags: in 0.22.1, -qh means 1080p at 60 fps, so add --fps 30 if you want 30.

Quality flags

FlagSizeFrame rate
-ql854x48015 fps
-qm1280x72030 fps
-qh1920x108060 fps
-qp2560x144060 fps
-qk3840x216060 fps

Add -p to open the video when it's done. Draft with -ql, which renders far faster, and switch to -qh for the final file.

Manim with Claude Code or Codex

Because a scene is plain Python, a coding agent such as Claude Code or Codex can write it and run the render. Two habits help: ask it to render with -ql first, and to look at a few frames before the final render, since a scene can run without errors and still overlap text. Our video skill creator can turn those steps into a reusable skill.

What Manim can't do

  • It has no timeline editor: you change code and render again.
  • It isn't made for footage, people or realistic scenes. It draws shapes, graphs and text.
  • Sound and voice-over aren't built in. You add them in an editor, or with a plugin from outside the project.
  • Installing it on Linux needs system packages or Docker, as above, and typeset formulas need LaTeX.

For titles, captions and promo videos written as web pages, see HyperFrames. For TypeScript animation, see Motion Canvas and Revideo, and for React, Remotion. Our guide to whether Claude can make videos compares the routes.

Questions

What is Manim?
A free Python library for making explanatory animations, especially maths: graphs, shapes, equations and text that move. You write a scene as a Python class and Manim renders it to a video file. Grant Sanderson of 3Blue1Brown created it.
Is Manim free?
Yes. Both Manim Community and 3Blue1Brown's ManimGL are under the MIT licence, so you can use them for paid work too.
What is the difference between Manim and ManimGL?
Manim Community (the manim package) is a community fork from 2020, with regular releases and its own docs. ManimGL (manimgl) is Grant Sanderson's own version, renders with OpenGL and was last released in December 2024. Their code isn't fully compatible, so follow one project's docs and don't mix them.
Does Manim need LaTeX or FFmpeg?
LaTeX only for typeset formulas (MathTex and Tex). Plain Text works without it, as in our clip. FFmpeg isn't needed since Manim Community 0.19.0, which switched to the PyAV library.
Which Python version does Manim need?
Manim Community 0.22.1 needs Python 3.11 or newer, according to its PyPI page.
Can Claude Code or Codex write Manim scenes?
Yes: a scene is plain Python, so a coding agent can write it and run the render command. Check the result frame by frame, since a scene can render without errors and still look wrong. Glidezo has no Manim skill: our free skills use HyperFrames.

Sources