Guide · Open source
How to use Manim: write, render and preview your first animation
Updated · written with AI from the project's own documentation and checked against our catalogue data
Manim is an open-source Python framework for making explanatory math animations. You describe objects and how they move or change in code, and Manim renders that code into a video. This guide is for programmers, educators and Python users who would rather script animations than edit video by hand. By the end you will know how to run a sample scene, render it from the terminal and choose the right preview and quality flags.
Quick start
- 1Try it online. Open the online Jupyter environment at try.manim.community to run examples without installing anything.
- 2Pick the community version. Follow only the community version's instructions, since the README warns that 3b1b/manim and this version are incompatible for installation.
- 3Install prerequisites. Install Python and the dependencies listed in the documentation for your operating system.
- 4Write a Scene. Create a file such as example.py with a class that subclasses Scene and animates objects inside construct.
- 5Render and preview. Run manim -p -ql example.py SquareToCircle in a terminal to render and open the video.
- 6Adjust output. Use -s for a final-frame still, -n to jump to a specific animation, or -f to open the output folder.
Choose the community version before you install
The README distinguishes the community edition (ManimCE) from the original 3b1b/manim repository. It says the two are incompatible for installation, so you should only follow the instructions for the version you pick. This guide covers the community version, which the README recommends for continued development, improved features and enhanced documentation.
If you only want to study how 3Blue1Brown makes his videos, the README points to Grant Sanderson's own repository instead.
Try Manim online without installing it
The quickest way to test Manim is the online Jupyter environment linked in the README. You can run the examples in a browser without setting anything up on your machine.
For a local installation, the README says Manim requires several dependencies to be installed first, and sends you to the documentation for instructions for your operating system. Manim's prerequisite listed here is Python.
Write your first Scene
In Manim, an animation is a Scene. You subclass Scene and put your animation steps inside its construct method. The example below creates a circle and a square, flips and rotates the square, fills the circle with pink, and then plays the animations in order.
Save the code in a file called example.py. The file name is up to you, but the class name must match the scene you run in the next step.
from manim import *
class SquareToCircle(Scene):
def construct(self):
circle = Circle()
square = Square()
square.flip(RIGHT)
square.rotate(-3 * TAU / 8)
circle.set_fill(PINK, opacity=0.5)
self.play(Create(square))
self.play(Transform(square, circle))
self.play(FadeOut(square))Render and preview the scene from the terminal
Run Manim from a terminal with the file name and the scene name. The README says the -p flag opens the video automatically when rendering finishes, and -ql renders faster at a lower quality. You should see your native video player open and play a square turning into a circle.
The README describes several other useful flags, listed below. For the full list, see the configuration guide in the documentation.
- -p: preview, so the video file opens when it is done rendering.
- -ql: faster rendering at a lower quality.
- -s: skip to the end and show only the final frame.
- -n <number>: skip ahead to the n'th animation of a scene.
- -f: show the file in the file browser.
manim -p -ql example.py SquareToCircleUse Manim in Jupyter notebooks
Manim ships with a %%manim IPython magic that lets you use it in JupyterLab and classic Jupyter notebooks. The README links the documentation for guidance on the magic and a Binder notebook you can try online.
The README also points to a gallery of more advanced examples and a set of simple examples in its GitHub repository.
Use Docker if you prefer a container
The community maintains a Docker image named manimcommunity/manim, available on DockerHub. The README sends you to the documentation for install and usage instructions for the image.
Get help and know the limits
The README says documentation is still in progress, so expect to combine the docs with examples and community help. For installation or usage questions, the README suggests the Discord server or the Reddit community. Bug reports and feature requests go in the GitHub issues.
The README also notes that Manim is undergoing a major refactor, and that contributions implementing new features will not be accepted during this period. Tests and documentation are the stated areas of need.
What people use it for
- Making a short explainer video that transforms one geometric shape into another.
- Scripting repeatable math or science animations that you can re-render after changing the code.
- Prototyping animations interactively in a Jupyter notebook using the %%manim magic.
- Trying Manim online in the browser before committing to a local install.
Frequently asked questions
Is Manim free to use?
Yes. The README says the software is double-licensed under the MIT license, with copyright held by 3blue1brown LLC and by the Manim Community Developers. The LICENSE and LICENSE.community files describe the terms.
What do I need to install Manim?
The README lists Python as the prerequisite and says several dependencies must be installed first. For your operating system, follow the installation section of the official documentation.
Can I try Manim without installing it?
Yes. The README links an online Jupyter environment at try.manim.community where you can run Manim in the browser. A Binder notebook of basic examples is also linked.
What is the difference between Manim and 3b1b/manim?
The README says ManimCE is the community-maintained fork of 3b1b/manim, which Grant Sanderson created and still maintains for his own videos. The README recommends the community version for ongoing development, features and documentation, and warns that the two cannot be installed by following each other's instructions.
How do I render a scene to video?
Save your code in a Python file and run manim -p -ql followed by the file name and scene class name in a terminal. The -p flag opens the video when rendering finishes, and -ql renders at a lower quality for speed.
Is there a point-and-click alternative?
The README describes Manim as driven by code, so it is not a point-and-click video editor. If you need one, pick a conventional video editor instead.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Manim suits Python programmers and educators who want precise, repeatable math animations written as code. Skip it if you need a point-and-click editor, or if you need complete reference documentation, since the README says the docs are still in progress.
Install options & downloads