Manimlib installation and usage tutorial (1)

Installation of manimlib

The author recently wanted to use a relatively good project software to create a very good math video animation. I happened to find manimlib, a math animation project on github. It can use various mathematical methods and formulas to deduce mathematical principles very well.
The manimlib installation environment requires python3.7. Installation is as follows

pip3 install manimlib

The environment used by the author is ubuntu19.10 environment. The dependent libraries required during the installation process include numpy, scipy, pillow, opencv, pycario, etc. During the process of compiling and installing pycairo, there was a problem that X11/Xlib.h was not found. This is because x11 was not installed completely. So take the following methods to solve this problem

sudo apt-get install libx11-dev 

libx11-dev is a low-level library for software development of xorg-server. But this problem still exists after installation. Finally check the relevant files

/usr/include/X11/Xlib.h
/usr/inculde/X11/X.h

Both of these files exist, and finally the author directly modified the header file

#include<X11/Xlib.h>

change into

#include<Xlib.h>

Including modifying the file Xlib.h

#include <X11/X.h>
/* applications should not depend on these two headers being included! */
#include <X11/Xfuncproto.h>
#include <X11/Xosdefs.h>

change into

#include <X.h>
/* applications should not depend on these two headers being included! */
#include <Xfuncproto.h>
#include <Xosdefs.h>

Then install pycairo separately and install it successfully.
Next, I will introduce how to use this project to make my own animation.

Guess you like

Origin blog.csdn.net/Zhang_Pro/article/details/107618244