Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at 3Blue1Brown.
NOTE: This repository is maintained by the Manim Community, and is not associated with Grant Sanderson or 3Blue1Brown in any way (though we are definitely indebted to him for providing his work to the world). If you want to study how Grant makes his videos, head over to the main repository (3b1b/manim). This is a more frequently updated repository than the main one, and is recommended if you want to use Manim for your own projects.
- Installation
- Usage
- Documentation
- Help with Manim
- Contributing
- License
Before installing manim-community
, there are some additional dependencies that you must have installed:
- Cairo
- FFmpeg
- Sox (optional, for sound)
- LaTeX (optional, for LaTeX)
- Visit the Download Page
- Select the download that corresponds to your PC's architechture and Python Version
cp38 corresponds to Python 3.8, cp37 corresponds to Python 3.7, etc win_amd64 corresponds to 64-bit machines, win32 corresponds to 32-bit machines
-
Open up your command prompt by hitting the Win key and typing
cmd
-
Enter the directory where you install cairo by typing
cd C:\path\to\cairo
with the path being where you downloaded the.whl
file -
Finally, run
pip3 install (cairo-file).whl
, where the file the appropriate name of the.whl
file. -
Alternatively, Running the command below installs pycairo. This needs to be an elevated command prompt like Powershell.
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/ManimCommunity/manim/master/scripts/pycairoinstall.py -UseBasicParsing).Content | py -3
- To install
ffmpeg
and add it to your PATH, install Chocolatey and runchoco install ffmpeg
- You can check you did it right by running
refreshenv
to update your environment variable and runningffmpeg
- Go to the SoX SourceForge page
- Select the newest version, and download the
.exe
file
- Add SoX to your PATH
- Find the directory where SoX is installed. By default, this is probably
C:\Program Files (x86)\sox-(version_number)
orC:\Program Files\sox-(version_number)
- Open a command prompt window by hitting the Win key and typing
cmd
- Run this command to update your PATH:
setx PATH %PATH%;C:\Program Files (x86)\sox-(version_number)
- Check you did it right by running
refreshenv
to update your environment variable and runningsox
- Find the directory where SoX is installed. By default, this is probably
- Download the MiKTex installer from its Download Page
- You can check you did it right by running
refreshenv
to update your environment variable and runninglatex
Before installing manim-community
, there are some additional dependencies that you must have installed:
- Cairo
- FFmpeg
- Sox (optional, for sound)
- LaTeX (optional, for LaTeX)
- Install the
libcairo2-dev
package with your package manager:sudo apt-get install libcairo2-dev
- Install the
ffmpeg
package with your package manager:sudo apt-get install ffmpeg
- You can check you did it right by running
ffmpeg -version
- Install the
sox
package with your package manager:sudo apt-get install sox
- You can check you did it right by running
sox
- Install
texlive
with your package manager by running the following commands:
sudo apt install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa
Note: this installation may take up a lot of space. The developers are working on providing a simpler, lighter LaTeX package for you to install
- You can check you did it right by running
latex
Before installing manim-community
, there are some additional dependencies that you must have installed:
- Cairo
- FFmpeg
- Sox (optional, for sound)
- LaTeX (optional, for LaTeX)
- Install the
cairo
package with your package manager:sudo pacman -S cairo
- Install the
ffmpeg
package with your package manager:sudo pacman -S ffmpeg
- You can check you did it right by running
ffmpeg -version
- Install the
sox
package with your package manager:sudo pacman -S sox
- You can check you did it right by running
sox
- Install
texlive
with your package manager by running the following commands:
sudo pacman -S texlive-most
Note: this installation may take up a lot of space. The developers are working on providing a simpler, lighter LaTeX package for you to install
- You can check you did it right by running
latex
Before installing manim-community
, there are some additional dependencies that you must have installed:
- Homebrew
- Cairo
- FFmpeg
- Sox (optional, for sound)
- LaTeX (optional, for LaTeX)
Homebrew is a package manager similar to apt
on linux that allows you to install packages easily.
If it is not installed, please install it with this command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
- Run
brew install cairo
- Refer to the section on Brew installation to see how to install
brew
- Run
brew install ffmpeg
- You can check you did it right by running
ffmpeg -version
- Refer to the section on Brew installation to see how to install
brew
- Run
brew install sox
- You can check you did it right by running
sox
- Refer to the section on Brew installation to see how to install
brew
- Run
brew cask install mactex
- You can check you did it right by running
latex
Note that MacTeX will require at least 4.5GB of hard disk space and bandwidth.
This is due to the fact that it installs every LaTeX addon package offered by CTAN. Only a few of these packages are required by Manim.
If you would like a smaller LaTeX install which only contains the packages needed by Manim alone, consider installing BasicTeX and suitable packages with the instructions below. This will require about 1.5 GB of space and bandwidth.
If you have installed MacTeX and are comfortable with it, do not install BasicTeX.
- Refer to the section on Brew installation to see how to install
brew
- Run
brew cask install basictex
- Ensure that the TeXLiveManager tool
tlmgr
works, by runningtlmgr --version
in the terminal. - Run
sudo tlmgr install standalone preview doublestroke relsize fundus-calligra wasysym physics dvisvgm.x86_64-darwin dvisvgm rsfs wasy cm-super
- Ensure that LaTeX works by running
latex
in the Terminal.
- Manim-Community runs on Python 3.6+. If you'd like to just use the library, you can install it from PyPI via pip:
pip3 install manimce
- However, if you'd like to contribute to and/or help develop
manim-community
, you can clone this branch to your local device. To do this, first make sure you havegit
installed. Then, clone this repo by executing either
git clone [email protected]:ManimCommunity/manim.git
or
git clone https://github.com/ManimCommunity/manim.git
depending on whether you want to use HTTPS or SSH. Finally, after having cloned this repo, run the following:
python3 -m pip install -r requirements.txt
To run your first example Scene, you can run the following commands:
- Download the
example_scenes/basic.py
file from GitHub, or place it manually in your current working directory with
wget https://raw.github.com/ManimCommunity/manim/master/example_scenes/basic.py
- Run the following command:
manim example_scenes/basic.py SquareToCircle -pl
- Run the following command to install manim:
pip install -e .
- Then run the following command below:
manim example_scenes/basic.py SquareToCircle -pl
The -p
flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The -l
flag is for a faster rendering at a lower quality.
Some other useful flags include:
-s
to skip to the end and just show the final frame.-n <number>
to skip ahead to then
'th animation of a scene.-f
to show the file in finder (for OSX).
You can also set MEDIA_DIR
environment variable to specify where the image and animation files will be written.
Documentation is in progress at eulertour.com/docs.
The issues board is reserved for bugs, and future features planned for Manim. If you need help installing or using Manim, please take a look at the Reddit Community or the Discord Community
Is always welcome. In particular, there is a dire need for tests and documentation.
For instructions, guidelines and other details, please check out the file CONTRIBUTING.md.
The software is double-licensed under the MIT license, with copyright by 3blue1brown LLC (see LICENSE), and copyright by Manim Community Developers (see LICENSE.community).