manim is a free, open source design & prototyping project written in Python and released under MIT. It has 94,045 GitHub stars, 7,724 forks and 500 open issues, and was last pushed 9 days ago. On this registry it ranks #3 of 23 tracked projects in Design & Prototyping, with 5 head-to-head comparisons available.

What is manim?

Manim is a Python animation engine for precise, programmatic rendering of explanatory mathematics videos, built for educators, mathematicians, and developers who want frame-accurate control over every element of a mathematical animation instead of editing on a timeline.

What it is

Manim is an engine for precise programmatic animations, designed for creating explanatory math videos. This repository is ManimGL, the original version that began as a personal project by the author of 3Blue1Brown for the purpose of animating those videos, with the video-specific code available in the separate 3b1b/videos repository. It is written in Python, released under the MIT licence, and requires Python 3.10 or higher. Scenes are defined in Python source files and rendered to video through a toolchain built on FFmpeg and OpenGL, with LaTeX used when typeset mathematics is needed.

The concrete problem it solves is the manual, frame-by-frame construction of mathematical animation. Instead of positioning and keyframing each element by hand, a scene is expressed as code: objects, transformations, and camera moves are described programmatically and rendered deterministically. That makes a mathematical animation reproducible, parameterizable, and reviewable the same way as any other source file. It lives in the Python packaging ecosystem, and the specific thing it replaces is timeline-based motion-graphics editing for content where the geometry must be exactly right rather than approximately right. Note that two versions of manim exist: this repository, and the community edition forked from it in 2020.

Key capabilities

  • Programmatic scene definition in Python, rendered with the manimgl command, for example manimgl example_scenes.py OpeningManimExample.
  • A manim-render command as an alternative entry point for rendering scenes.
  • LaTeX rendering for typeset mathematics, listed as an optional dependency.
  • OpenGL-based rendering, listed in the system requirements alongside FFmpeg.
  • Distribution on PyPI under the package name manimgl, so that pip install manimgl installs this repository rather than the community edition.
  • An editable install path, pip install -e ., for working on the manimlib library itself.
  • Repository topics that state the intended use directly: 3b1b-videos, animation, explanatory-math-videos, python.

Who uses it and how

  • Video creators producing explanatory mathematics content, the use case the engine was written for and the one the repository topics name.
  • The 3Blue1Brown channel itself, which keeps its video-specific code separately in the 3b1b/videos repository.
  • Developers hacking on the engine, who clone the repository and run pip install -e . to install against a working copy of manimlib.
  • Linux users on Ubuntu or Debian, where the documented setup installs ffmpeg, python3-pip, libpango1.0-dev, and a lightweight LaTeX selection covering most projects, optionally inside a venv.
  • Windows users, who install FFmpeg and MiKTeX and then install the remaining Python packages.
  • A community gathered around a subreddit and a Discord server linked from the README.

Getting started

Install with pip install manimgl, then run manimgl, or render a scene directly with manimgl example_scenes.py OpeningManimExample. System requirements are FFmpeg and OpenGL, with LaTeX optional, and Linux additionally needs Pango along with its development headers.

How it compares

The README points to the community edition, ManimCommunity/manim, forked from this repository in 2020 with the stated goals of being more stable, better tested, quicker to respond to community contributions, and friendlier to get started with. The two share an origin but not an installation path, and the README warns that applying instructions for one version while installing the other will cause problems. Choosing between them is a choice between the original engine used for the 3Blue1Brown videos and a fork oriented toward onboarding and maintenance responsiveness.

When to use it — and when not to

A self-hoster must supply FFmpeg, OpenGL, Python 3.10 or higher, and LaTeX if typeset math is wanted, plus Pango and its development headers on Linux before anything renders. Anyone who wants the more heavily tested, more newcomer-friendly fork should choose the community edition instead of this repository. The clear weakness is the two-version split: the package is named manimgl rather than manim or manimlib, the README carries an explicit warning that mixing install instructions breaks things, and the repository currently carries roughly 500 open issues.

project readme (upstream, from github) — read inline

pypi version MIT License Manim Subreddit Manim Discord docs

Manim is an engine for precise programmatic animations, designed for creating explanatory math videos.

Note, there are two versions of manim. This repository began as a personal project by the author of 3Blue1Brown for the purpose of animating those videos, with video-specific code available here. In 2020 a group of developers forked it into what is now the community edition, with a goal of being more stable, better tested, quicker to respond to community contributions, and all around friendlier to get started with. See this page for more details.

Installation

[!Warning] WARNING: These instructions are for ManimGL only. Trying to use these instructions to install Manim Community/manim or instructions there to install this version will cause problems. You should first decide which version you wish to install, then only follow the instructions for your desired version.

[!Note] Note: To install manim directly through pip, please pay attention to the name of the installed package. This repository is ManimGL of 3b1b. The package name is manimgl instead of manim or manimlib. Please use pip install manimgl to install the version in this repository.

Manim runs on Python 3.10 or higher.

System requirements are FFmpeg, OpenGL and LaTeX (optional, if you want to use LaTeX). For Linux, Pango along with its development headers are required. See instruction here.

Directly

# Install manimgl
pip install manimgl

# Try it out
manimgl

For more options, take a look at the Using manim sections further below.

If you want to hack on manimlib itself, clone this repository and in that directory execute:

# Install manimgl
pip install -e .

# Try it out
manimgl example_scenes.py OpeningManimExample
# or
manim-render example_scenes.py OpeningManimExample

Linux (Ubuntu/Debian)

  1. Install system dependencies.
sudo apt update

sudo apt install ffmpeg
sudo apt install python3-pip
sudo apt install libpango1.0-dev
  1. Install a lightweight LaTeX distribution (optional, for LaTeX rendering).
sudo apt install texlive-science texlive-fonts-extra texlive-latex-extra

This lightweight setup is significantly smaller than installing texlive-full while still supporting most Manim projects.

  1. Clone and install ManimGL.
git clone https://github.com/3b1b/manim.git
cd manim

python3 -m pip install -e .

manimgl example_scenes.py OpeningManimExample
💡 Optional: Using a virtual environment (venv)

It is recommended to use a virtual environment to avoid conflicts with system packages.

sudo apt install python3-venv

python3 -m venv venv
source venv/bin/activate

python3 -m pip install -e .

If python3-venv is unavailable on your system, try installing the version-specific package instead:

sudo apt install python3.12-venv

Directly (Windows)

  1. Install FFmpeg.
  2. Install a LaTeX distribution. MiKTeX is recommended.
  3. Install the remaining Python packages.
    git clone https://github.com/3b1b/manim.git
    cd manim
    pip install -e .
    manimgl example_scenes.py OpeningManimExample
    

Mac OSX

  1. Install FFmpeg, LaTeX in terminal using homebrew.
    brew install ffmpeg mactex
    
💡 An alternative to heavyweight MacTeX bundle.
  > To avoid installing the full MacTeX bundle, which is ~6GB, you can alternatively install the
  > lightweight [BasicTeX](https://formulae.brew.sh/cask/basictex) and then gradually add
  > only the LaTeX packages you actually need. A list of packages sufficient to run examples can 
  > be found [here](https://github.com/3b1b/manim/issues/2133#issuecomment-2414547866).
  > For an overview of the MacTeX installer bundles, see https://www.tug.org/mactex/.
</details>
  1. If you are using an ARM-based processor, install Cairo.

    arch -arm64 brew install pkg-config cairo
    
  2. Install latest version of manim using these command.

    git clone https://github.com/3b1b/manim.git
    cd manim
    pip install -e .
    manimgl example_scenes.py OpeningManimExample
    

    If the last command is not found, make sure the directory pip installed manimgl into is on your PATH.

Anaconda Install

  1. Install LaTeX as above.
  2. Create a conda environment using conda create -n manim python=3.10.
  3. Activate the environment using conda activate manim.
  4. Install manimgl using pip install -e ..

Using manim

Try running the following:

manimgl example_scenes.py OpeningManimExample

This should pop up a window playing a simple scene.

Look through the example scenes to see examples of the library's syntax, animation types and object types. In the 3b1b/videos repo, you can see all the code for 3blue1brown videos, though code from older videos may not be compatible with the most recent version of manim. The readme of that repo also outlines some details for how to set up a more interactive workflow, as shown in this manim demo video for example.

When running in the CLI, some useful flags include:

  • -w to write the scene to a file
  • -o to write the scene to a file and open the result
  • -s to skip to the end and just show the final frame.
    • -so will save the final frame to an image and show it
  • -n to skip ahead to the n'th animation of a scene.
  • -f to make the playback window fullscreen

Take a look at custom_config.yml for further configuration. To add your customization, you can either edit this file, or add another file by the same name "custom_config.yml" to whatever directory you are running manim from. For example this is the one for 3blue1brown videos. There you can specify where videos should be output to, where manim should look for image files and sounds you want to read in, and other defaults regarding style and video quality.

Documentation

Documentation is in progress at 3b1b.github.io/manim. And there is also a Chinese version maintained by @manim-kindergarten: docs.manim.org.cn (in Chinese).

manim-kindergarten wrote and collected some useful extra classes and some codes of videos in manim_sandbox repo.

Contributing

Is always welcome. As mentioned above, the community edition has the most active ecosystem for contributions, with testing and continuous integration, but pull requests are welcome here too. Please explain the motivation for a given change and examples of its effect.

License

This project falls under the MIT license.

Frequently asked questions

Is manim free to use?

manim is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does manim do?

Animation engine for explanatory math videos

What is manim written in?

manim is primarily written in Python. Its source is publicly available at https://github.com/3b1b/manim, and it has 94,045 GitHub stars.