Manim: 一个数学可视化的动画引擎
官网:https://3b1b.github.io/manim/index.html
借鉴:做出高逼格的数学动画——一起来学manim·入门篇(一)
安装Manim软件
借鉴:Python视频制作引擎Manim安装教程
通过git bash运行下面命令【git bash安装看这里】
git clone https://github.com/3b1b/manim.git
cd manim
# 安装python依赖
pip install -e .
python -m pip install -r requirements.txt
测试
出现下述动态图
ManimGL v1.6.1
[08:32:12] INFO Using the default configuration file, which config.py:362
you can modify in
`c:\users\18826\manim\manimlib\default_config
.yml`
INFO If you want to create a local configuration config.py:363
file, you can create a file named
`custom_config.yml`, or run `manimgl
--config`
WARNING You may be using Windows platform and have config.py:327
not specified the path of
`temporary_storage`, which may cause OSError.
So it is recommended to specify the
`temporary_storage` in the config file (.yml)
[08:32:13] WARNING You may be using Windows platform and have config.py:327
not specified the path of
`temporary_storage`, which may cause OSError.
So it is recommended to specify the
`temporary_storage` in the config file (.yml)
INFO Using the default configuration file, which config.py:362
you can modify in
`c:\users\18826\manim\manimlib\default_config
.yml`
INFO If you want to create a local configuration config.py:363
file, you can create a file named
`custom_config.yml`, or run `manimgl
--config`
WARNING You may be using Windows platform and have config.py:327
not specified the path of
`temporary_storage`, which may cause OSError.
So it is recommended to specify the
`temporary_storage` in the config file (.yml)
[08:32:18] WARNING You may be using Windows platform and have config.py:327
not specified the path of
`temporary_storage`, which may cause OSError.
So it is recommended to specify the
`temporary_storage` in the config file (.yml)
Traceback (most recent call last):
File "C:\Users\18826\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\18826\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\18826\AppData\Local\Programs\Python\Python39\Scripts\manimgl.exe\__main__.py", line 7, in <module>
File "C:\Users\18826\manim\manimlib\__main__.py", line 25, in main
scene.run()
File "C:\Users\18826\manim\manimlib\scene\scene.py", line 160, in run
self.construct()
File "example_scenes.py", line 29, in construct
IntegerMatrix(matrix, include_background_rectangle=True),
File "C:\Users\18826\manim\manimlib\mobject\matrix.py", line 204, in __init__
super().__init__(matrix, element_alignment_corner=element_alignment_corner, **kwargs)
File "C:\Users\18826\manim\manimlib\mobject\matrix.py", line 99, in __init__
self.add_brackets(bracket_v_buff, bracket_h_buff)
File "C:\Users\18826\manim\manimlib\mobject\matrix.py", line 144, in add_brackets
brackets = Tex("".join((
File "C:\Users\18826\manim\manimlib\mobject\svg\tex_mobject.py", line 57, in __init__
super().__init__(
File "C:\Users\18826\manim\manimlib\mobject\svg\string_mobject.py", line 68, in __init__
super().__init__(
File "C:\Users\18826\manim\manimlib\mobject\svg\svg_mobject.py", line 76, in __init__
self.init_svg_mobject()
File "C:\Users\18826\manim\manimlib\mobject\svg\svg_mobject.py", line 105, in init_svg_mobject
submobs = self.mobjects_from_file(self.get_file_path())
File "C:\Users\18826\manim\manimlib\mobject\svg\string_mobject.py", line 78, in get_file_path
return self.get_file_path_by_content(self.get_content(is_labelled))
File "C:\Users\18826\manim\manimlib\mobject\svg\tex_mobject.py", line 85, in get_file_path_by_content
return tex_content_to_svg_file(
File "C:\Users\18826\manim\manimlib\utils\tex_file_writing.py", line 82, in tex_content_to_svg_file
with display_during_execution("Writing " + short_tex):
File "C:\Users\18826\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 119, in __enter__
return next(self.gen)
File "C:\Users\18826\manim\manimlib\utils\tex_file_writing.py", line 153, in display_during_execution
max_characters = os.get_terminal_size().columns - 1
OSError: [WinError 6]
执行遇到问题
no module named “manimlib”
需要将该文件放到软件安装的目录下,比如,本次软件安装在自己创建的manim文件夹中
【manim】导入库时出现ModuleNotFoundError: No module named‘manimlib.XXX‘解决方法