Make 3Blue1Brown-style animations with a few lines of Python
Vertical maths and data clips for Reels, Shorts and TikTok, written in a few lines of Python. Manim is the free animation engine behind the 3Blue1Brown videos: shapes that morph, charts that grow, a dot riding a graph, and a 15-second explainer you fill in with your own idea.
- Fast renders: under 7 seconds for a quick preview and under 13 seconds for a full HD clip, on a laptop with no graphics card
- Windows, Mac or Linux, with about 600MB of free disk space (the project folder comes to about 350MB with the optional equation extra, plus uv's download cache)
- uv installed. It's a small, official tool that installs Python apps cleanly. Step 1 shows you how
- Notepad or any code editor. You'll paste code, not write it from scratch
- No maths degree. If you can change a number in a list, you can make the chart
Install Manim
Manim lives in its own project folder, so it can't clash with anything else on your PC.
Manim was created by Grant Sanderson, the person behind the 3Blue1Brown ↗ maths channel, to animate his own videos. There are now two versions, and it matters which one you install:
- Manim Community (ManimCommunity/manim ↗): a fork of Grant's code that a group of developers started in 2020 and the community now maintains. Its README recommends it for its active development and better documentation. This is what
uv add maniminstalls, and what this mission uses. - ManimGL (3b1b/manim ↗): Grant's own version, which he still maintains. It installs under a different name,
manimgl.
TipCode and install instructions for one version often fail on the other. When you search for help or ask an AI, say Manim Community (or ManimCE).- Manim Community (ManimCommunity/manim ↗): a fork of Grant's code that a group of developers started in 2020 and the community now maintains. Its README recommends it for its active development and better documentation. This is what
We install it with uv. If you don't have it yet, install it first, then close the terminal and open a new one:
Windows (only if you don't have uv)winget install --id astral-sh.uv -eMac or Linux (only if you don't have uv)curl -LsSf https://astral.sh/uv/install.sh | shOn Mac and Linux, Manim also needs a few system libraries for drawing and text. Install them once, from Manim's install guide ↗ (Windows users skip this):
Mac (with Homebrew)brew install cairo pkg-configLinux (Ubuntu / Debian)sudo apt update sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-devLinux (Fedora)sudo dnf install python3-devel pkg-config cairo-devel pango-develNow make a project folder called
manimationswith Manim inside it. Run these one at a time:Terminaluv init --python 3.12 manimations cd manimations uv add "manim>=0.22,<0.23"OutputInitialized project `manimations` at `...\manimations` Using CPython 3.12.13 Creating virtual environment at: .venv Resolved 38 packages in 3.42s ... + av==19.0.1 ... + manim==0.22.0 + manimpango==0.7.0 ... + pycairo==1.29.2 ...It takes under a minute on a normal connection, and the project folder comes to about 290MB. Cairo draws the shapes, Pango handles text, and PyAV writes the video with FFmpeg built in, so you don't need to install FFmpeg separately.
Pinned on purpose
<0.23keeps you on Manim 0.22, the version every scene here was written for. Manim is still on 0.x releases, which can rename or change things between versions. When you want a newer one, change the pin, re-render one scene, and check it still looks right.Check it's healthy:
Terminaluv run manim checkhealthOutputManim Community v0.22.0 ... Checking whether your installation of Manim Community is healthy... - Checking whether manim is on your PATH ... PASSED - Checking whether the executable belongs to manim ... PASSED - Checking whether latex is available ... FAILED - Checking whether dvisvgm is available ... SKIPPEDThe LaTeX failure is expected. LaTeX is a separate typesetting program. Manim uses it for its classic equation objects and, unless you tell it otherwise, for the numbers on charts and graphs. This mission works round it, and the text and equations step shows a lighter way to get proper equations.
TipEvery Manim command in this mission starts withuv run. That tells uv to use the Manim inside this folder, so alwayscd manimationsfirst when you open a new terminal.
uv run manim checkhealth prints Manim Community v0.22.0 and PASSED for the first two checks.If it breaksLines of SyntaxWarning: invalid escape sequence the first time you run it + 3 more
Lines of SyntaxWarning: invalid escape sequence the first time you run it
error: Failed to spawn: manim and program not found
cd manimations (from the folder you made it in) and try again.Can I use Python 3.14 instead of 3.12?
uv add manim says Microsoft Visual C++ is required
--python 3.12. If it still happens, Manim's docs say to install the free Microsoft C++ Build Tools with the Desktop development with C++ workload, then open a new terminal and run uv add manim again.