Installing Manim locally

The standard way of installing Manim is by using Python’s package manager pip to install the latest release from PyPI.

To make it easier for you to follow best practices when it comes to setting up a Python project for your Manim animations, we strongly recommend using a tool for managing Python environments and dependencies. In particular, we strongly recommend using uv.

For the two main ways of installing Manim described below, we assume that uv is available; we think it is particularly helpful if you are new to Python or programming in general. It is not a hard requirement whatsoever; if you know what you are doing you can just use pip to install Manim directly.

Installing the Python management tool uv

One way to install uv is via the dedicated console installer supporting all large operating systems. Simply paste the following snippet into your terminal / PowerShell – or consult uv’s documentation for alternative ways to install the tool.

curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Of course, if you know what you are doing and prefer to setup a virtual environment yourself, feel free to do so!

Important

If you run into issues when following our instructions below, do not worry: check our installation FAQs to see whether the problem is already addressed there – and otherwise go and check how to contact our community to get help.

Installation

Step 1: Installing Python

We first need to check that an appropriate version of Python is available on your machine. Open a terminal to run

uv python install

to install the latest version of Python. If this is successful, continue to the next step.

Step 2 (optional): Installing LaTeX

LaTeX is a very well-known and widely used typesetting system allowing you to write formulas like

\[\begin{equation*} \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{(z - z_0)^{n+1}}~dz = \frac{f^{(n)}(z_0)}{n!}. \end{equation*}\]

If rendering plain text is sufficient for your needs and you don’t want to render any typeset formulas, you can technically skip this step. Otherwise select your operating system from the tab list below and follow the instructions.

For Windows we recommend installing LaTeX via the MiKTeX distribution. Simply grab the Windows installer available from their download page, https://miktex.org/download and run it.

If you are running MacOS, we recommend installing the MacTeX distribution. The latest available PKG file can be downloaded from https://www.tug.org/mactex/mactex-download.html. Get it and follow the standard installation procedure.

Given the large number of Linux distributions with different ways of installing packages, we cannot give detailed instructions for all package managers.

In general we recommend to install a TeX Live distribution (https://www.tug.org/texlive/). For most Linux distributions, TeX Live has already been packaged such that it can be installed easily with your system package manager. Search the internet and your usual OS resources for detailed instructions.

For example, on Debian-based systems with the package manager apt, a full TeX Live distribution can be installed by running

sudo apt install texlive-full

For Fedora (managed via dnf), the corresponding command is

sudo dnf install texlive-scheme-full

As soon as LaTeX is installed, continue with actually installing Manim itself.

I know what I am doing and I would like to setup a minimal LaTeX installation

You are welcome to use a smaller, more customizable LaTeX distribution like TinyTeX. Manim overall requires the following LaTeX packages to be installed in your distribution:

amsmath babel-english cbfonts-fd cm-super count1to ctex doublestroke dvisvgm everysel
fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin
mathastext microtype multitoc physics preview prelim2e ragged2e relsize rsfs
setspace standalone tipa wasy wasysym xcolor xetex xkeyval

Step 3: Installing Manim

These steps again differ slightly between different operating systems. Make sure you select the correct one from the tab list below, then follow the instructions below.

The following commands will

  • create a new directory for a Python project,

  • and add Manim as a dependency, which installs it into the corresponding local Python environment.

The name for the Python project is manimations, which you can change to anything you like.

uv init manimations
cd manimations
uv add manim

Manim is now installed in your local project environment!

Practically, the instructions given in the MacOS & Windows tab also apply for Linux – however, some additional dependencies are required as Linux users need to build ManimPango (and potentially pycairo) from source. More specifically, this includes:

  • A C compiler,

  • Python’s development headers,

  • the pkg-config tool,

  • Pango and its development headers,

  • and Cairo and its development headers.

Instructions for popular systems / package managers are given below.

sudo apt update
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev
sudo dnf install python3-devel pkg-config cairo-devel pango-devel
sudo pacman -Syu base-devel cairo pango

As soon as the required dependencies are installed, you can create a Python project (feel free to change the name manimations used below to some other name) with a local environment containing Manim by running

uv init manimations
cd manimations
uv add manim

To verify that your local Python project is setup correctly and that Manim is available, simply run

uv run manim checkhealth

At this point, you can also open your project folder with the IDE of your choice. All modern Python IDEs (for example VS Code with the Python extension, or PyCharm) should automatically detect the local environment created by uv such that if you put

import manim

into a new file my-first-animation.py, the import is resolved correctly and autocompletion is available.

Happy Manimating!

Alternative: Installing Manim as a global uv-managed tool

If you have Manim projects in many different directories and you do not want to setup a local project environment for each of them, you could also install Manim as a uv-managed tool.

See uv’s documentation for more information on their tool mechanism.

To install Manim as a global uv tool, simply run

uv tool install manim

after which the manim executable will be available on your global system path, without the need to activate any virtual environment or prefixing your commands with uv run.

Note that when using this approach, setting up your code editor to properly resolve import manim requires additional work, as the global tool environment is not automatically detected: the base path of all tool environments can be determined by running

uv tool dir

which should now contain a directory manim in which the appropriate virtual environment is located. Set the Python interpreter of your IDE to this environment to make imports properly resolve themselves.

Installing Manim for a different version of Python

In case you would like to use a different version of Python (for example, due to compatibility issues with other packages), then uv allows you to do so in a fairly straightforward way.

When initializing the local Python project, simply pass the Python version you want to use as an argument to the init command:

uv init --python 3.12 manimations
cd manimations
uv add manim

To change the version for an existing package, you will need to edit the pyproject.toml file. If you are downgrading the python version, the requires-python entry needs to be updated such that your chosen version satisfies the requirement. Change the line to, for example requires-python = ">=3.12". After that, run uv python pin 3.12 to pin the python version to 3.12. Finally, run uv sync, and your environment is updated!