How to Install Manim (Easy Way) — Step by Step Tutorial

Fajrul Falah
4 min readAug 30, 2020
how to install manim

PS: This is installation tutorial for Manim Cairo, which is already outdated. Current version of Manim is ManimGL or there is community version ManimCE.

Manim is an animation engine for explanatory math videos. It’s used to create precise animations programmatically, as seen in the videos at 3Blue1Brown.

In this article, I’ll show you exactly how to install Manim in Windows, because the installation process is quite tricky. It takes me more than 2 days (and a lot of frustration) to completely install Manim for the first time.

But with this tutorial, you can do it under 30 minutes.

The Requirements

Manim is built with 5 components:

  1. Python 3: The heart of the machine
  2. LaTeX: Program for writing text and formula
  3. Cairo: Program for making the figures
  4. FFmpeg: Program for converting frames to video
  5. SoX: Program for the audio

Here’s the step by step process to install Manim.

Anyway, you can watch the video version of this tutorial on my Youtube channel.

Visualization 101’s Youtube channel.

(The tutorial video is still on progress, but you still can watch my other video using manim)

1. Install Python

Manim originally runs on Python 3.7, so I suggest to use it rather than the higher version.

Download Python 3.7 for Windows here and install it on your computer.

Check “Add Python 3.7 to PATH”, click “Install Now”, and finish the process.

2. Install LaTeX

For LaTeX program, we can use MikTeX.

MiKTeX is a free distribution of the TeX/LaTeX typesetting system for Microsoft Windows.

Go to MikTeX download page.

There are two option here:

  • Download full MikTeX, or
  • Download only basic MikTeX and all needed packages for Manim.

If you have a good internet connection (and eager to wait for a long time), you can download the full version of MikTeX by clicking “Net Installer” option.

Personally I choose the basic installer because it is more simple and can do the work exactly the same.

To download the basic MikTeX, click the Basic Installer option. Then, install the program on your computer.

3. Install Cairo

Download PyCairo here.

Since we’re using Python 3.7, download Pycairo whl file with the version code of “cp37”.

To install pycairo, open the folder where you save the Pycairo whl file and type “cmd” on the file location bar.

On the command prompt window, type this code to install pycairo:

pip install [pycairo whl file name]

4. Install FFmpeg

Download FFmpeg here.

Extract the zip file and copy the files to your C drive.

After that, add FFmpeg to PATH by following steps:

  • Type “Edit the System Environment Variable” on search.
  • Click “Environment Variables”
  • Double click on “Path”
  • Click New and paste “C:\FFmpeg\bin” there.
  • Ok and ok.

5. Install SoX

Download SoX here and then install it on your computer.

After that, add SoX to PATH by the following steps:

  • Type “Edit the System Environment Variable” on search.
  • Click “Environment Variables”
  • Double click on “Path”
  • Click New and paste “C:\Program Files (x86)\sox-14–4–2” there.
  • Ok and ok.

6. Download Manim Source Code

Download manim source code on Github.

Extract the zip file on your computer.

7. Download additional MikTeX packages

(You can skip this step if you download the full version of MikTeX — rather than the basic version)

  • Go to Manim folder > manimlib
  • Open “ctex_template.tex” file with MikTeX
  • Click the green play button so that MikTeX automatically install the needed packages for manim. Wait until the process is complete.
  • Do the same step by opening “tex_template.tex” and click green play button.

8. Install Manim Python requirements

To finish your installation, you need to install some Python packages required for manim.

You can do this by using this command:

python3 -m pip install -r requirements.txt

That’s all!

After completing all of those steps, you are ready to use manim.

To check whether your installation is success or not, you can type this command on cmd. Make sure you open cmd in your manim directory.

python -m manim example_scene.py SquareToCircle -pl

If that command gives you result with no error, then you’re ready to create beautiful math animation using manim.

Any question? Please leave the comment.

Thanks.

--

--