For this demonstration, I’ll be using Fedora 29 as well as Ubuntu 18.04. The steps should be similar for any Linux distribution and/or mac.
The first step would be to clone the manim’s repository form https://github.com/3b1b/manim
cario: 2D graphics library
latex: A high-quality typesetting system
ffmpeg: Rendering videos
sox: Sound Processing
To install the prequsites in Fedora:
Similarly, in Ubuntu:
For the sake of convenience, I’ll be using a virtual environment. It is optional, If you think it is too much, you can skip to pip installation.
To create a virtual environment make a new directory,
envs where you cloned manim. Then execute:
That’ll create a new directory
manim-venv, once that directory is created, activate the virtual environment using
Once that is done, enter the manim directory (for me it’s
~/Documents/manim) and we’re ready to install the python libraries.
if you didn’t go with virtual environment, it’ll look like:
If everything goes right, you’re all set, but since we live in a chaotic universe, it is unlikely that odds will turn out in our favour.
The two errors that I faced while installing were based on
Exception: Latex error converting to dvi. See log output above or the log file This error indicates that the latex is not installed and/or required packages are not installed in latex. Instead of trying to work my way around it, I just installed
texlive-scheme-full, but if you don’t wanna do that, you can see if all the packages mentioned here are installed.
The second error that I got was on cario. Absentmindedly, I was trying to install
pycario without a
cario backend in my system and was greeted blissfully by:
Error on pycario: failed with error code 1 in /tmp/pip-install-mgw5hikm/pycairo/
To check if the installation was successful, go to manim’s root directory (cross your fingers) and run:
If everything is working, then you should see the video of square transforming into a circle. The video will be saved in
manim/media/videos/example_scenes as a
(As you would have guessed, each python file will have its separate folder inside the media directory).
If you don’t see the video, that means something’s wrong with your installation process, retracing your steps or starting again would be a good idea.
Finally, there’s just one last thing that we have to do to make it more convenient for us to start away. In lieu of a recent pull request, we will add the current manim directory to
PYTHONPATH. (I’ll explain why we’re doing it in the next tutorial)
For Fedora & Ubuntu, to add manim repo to
With all the housekeeping out of the way, we’re now actually ready now start rendering videos in manim. Follow along to the next tutorial.