This step-by-step guide will walk you through installing Manim on WSL (Windows Subsystem for Linux) with Anaconda, along with all the necessary system libraries like FFmpeg, Cairo, Pango, and LaTeX. By the end of this guide, you'll have a fully functional Manim installation, ready to render animations.
Before you begin, ensure you have the following:
It’s a good idea to create a separate Conda environment for Manim to manage dependencies cleanly.
Open your WSL terminal.
Create a new Conda environment with Python 3.10:
conda create -n manim_env python=3.10
Activate the environment:
conda activate manim_env
Now, all installations will be scoped to this environment.
Manim depends on system-level libraries such as Cairo and Pango for text rendering and FFmpeg for video rendering. You need to install these libraries before proceeding.
Run the following commands to install essential development tools:
sudo apt-get update
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev pkg-config python3-dev
build-essential
: Installs essential development tools, including gcc
, g++
, and make
.libcairo2-dev
: Development libraries for the Cairo graphics library.libpango1.0-dev
: Development files for the Pango text rendering library.pkg-config
: A helper tool used during the compilation of programs.python3-dev
: Python development headers needed to build certain Python packages.Manim uses FFmpeg to handle video rendering. You have two installation options: using Conda (recommended) or installing it globally using sudo
.
This keeps FFmpeg scoped to your environment, avoiding potential conflicts with system-wide packages.