Manim: mathematical animation engine memo
- Using manim by 3Blue1Brown
- Using manim by manim comminuty
- Tutorial and resources
I first tried 3Blue1Brown's repository and then try the community manim.
- Switch Python 3.7 in Kubuntu 18.04
How to upgrade to python 3.7 on Ubuntu 18.10
sudo apt-get install python3.7
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
sudo update-alternatives --config python3
choose /usr/bin/python3.7 manual mode (for me it was 2.)
- For picairo build:
sudo apt-get install python3.7-dev
sudo apt-get install python3.7-dbg
- Install manimlib|
Install doc|Fodora 29/Ubuntu 18 manim installation
- git clone https://github.com/3b1b/manim.git
- Cairo:
sudo apt-get install libcairo2-dev
- ffmpeg:
sudo apt-get install ffmpeg
- sox:
sudo apt-get install sox
- ffmpeg:
sudo apt-get install ffmpeg
- also venv,
sudo apt-get install python3-venv
- at manim dir,
python3 -m venv manim-venv
I failed this by the following error.
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Thus, I installed venv. note: python3-venv will be python 3.6's venv, so,
apt-get install python3.7-venv
source manim-venv/bin/activate
- I am in the virtual environment, the prompt is (manim-env) hioshi...[120]bash %
- Under the virtual environment,
python3 -m pip install -r requirements.txt
- run example:
python -m manim ${manim_prog.py} ${ManimFunc} -pl
Ex: python -m manim func_01.py AddUpdaterFunc -pl
- Windows manim install
- Download and install
- MikTex: basic-miktex-2.9.7342.exe (32bit),
add path: C:\Program Files\MiKTeX 2.9\miktex\bin\x64
- python3, python-3.8.1-amd64.exe,
add path automatically if checked at the install panel
- ffmpeg, ffmpeg-4.2.2-win64-static.zip, expand and
add path: C:\Program Files\ffmpeg-4.2.2\bin
- sox, sox-14.4.2-win32.exe, Add path C:\Program Files (x86)\sox-14-4-2
- pycairo, downloaded pre compiled whl file, pycairo-1.19.0-cp38-cp38-win_amd64.whl from
https://www.lfd.uci.edu/~gohlke/pythonlibs/. pip install pycairo-1.19.0-cp38-cp38-win_amd64.whl
- manim, zip
download, pip install -r requirements.txt (but I found
visual studio compiler dependency. I recommend to download precompiled version for each requirements manually.)
I tried the cloned repository instead of pip package on Linux.
- See the community manim documentation. Install binaries
- git clone https://github.com/ManimCommunity/manim.git
- sudo apt install libcairo2-dev
- sudo apt install ffmpeg
- sudo apt install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa
- sudo apt install python3-pip
- sudo apt install curl
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
- # cd manim directory ${HOME}/.poetry/bin
- # add path ${HOME}/.poetry/bin
- poetry env use 3.7
- # At the directory where you see the pyproject.toml file
- poetry install
- Use poetry
- # At the directory where you see the pyproject.toml file
- poetry shell
- # move to your project dir
- python3 -m manim scene.py -p -ql
- Tips
- Disable console color output: set environment variable NO_COLOR
(see python rich module:
rich console API)
- Tutorials, Examples
- Internationalization
- Set a video player on KDE
- On KDE, manimlib/constants.py's STREAMING_CLIENT (=
"ffplay") is not respected. The KDE's file association was
chosen. To set the file association on KDE (tested 18_04),
System Settings -- Applications -- File Associations, on
Configire file associations: video -- mp4. e.g., VLC media player
Copyright (C) 2019-2020 Hitoshi Yamauchi