Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically.
-
Install Python3.7
-
https://www.python.org/downloads/release/python-371/
Or you can install with brew
brew install python3
-
-
Install latex
-
Install cairo ffmpeg pgk-config and sox with brew
brew install cairo brew install pkg-config brew install ffmpeg brew install sox
-
Clone the Manim
-
git clone https://github.com/3b1b/manim.git cd manim pip3 install -r requirements.txt //You may be failed on Mac with pip, but pip3 is OK.
- Install with pip
pip3 install virtualenv
-
Creat a env and get into env
virtualenv venv
source venv/bin/activate
-
You may meet error here. To solve it you can follow next
source ~/venv/bin/activate
-
You can get out of the env with
deactivate
-
##Do a little modify
Find constant.py
in your manim
and get to line 23 ,find that says "Dropbox(3Blue1Brown)/3Blue1Brown Team Folder". We need to change this line to match the output folder you just created. In my case, I replaced that line with manim/media
. You should replace it with whatever your file path is (keeping in mind that “~” in the line above is a short for the file path to your home directory).
else:
MEDIA_DIR = os.path.join(
os.path.expanduser('~'),
"manim.media"
)
Remember to start in the venv and in the path manim
python3 extract_scene.py example_scenes.py SquareToCircle -p
python3 extract_scene.py example_scenes.py UdatersExample -p
Now, you can find the vedio created in manim/media
You are succeed if there is no error.