64 lines
1.8 KiB
Markdown
64 lines
1.8 KiB
Markdown
|
### 一、安装步骤
|
|||
|
```sh
|
|||
|
#1、创建python3.10虚拟环境
|
|||
|
conda create -n manim-env python=3.10 -y
|
|||
|
|
|||
|
#2、激活python3.10虚拟环境
|
|||
|
conda activate manim-env
|
|||
|
|
|||
|
#3、添加到环境变量【必须,否则报错:CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to download and install packages.】
|
|||
|
D:\anaconda3\Library\bin
|
|||
|
|
|||
|
#4、安装manim
|
|||
|
conda install -c conda-forge numpy=1.23.5 scipy=1.9.3 --show-channel-urls -y
|
|||
|
|
|||
|
|
|||
|
#5、下载安装ffmpeg
|
|||
|
ffmpeg
|
|||
|
|
|||
|
#6、安装manim
|
|||
|
pip install pycairo sox manim
|
|||
|
# 验证版本
|
|||
|
manim --version
|
|||
|
```
|
|||
|
|
|||
|
>
|
|||
|
|
|||
|
```sh
|
|||
|
#5.下载安装MiKTeX
|
|||
|
https://miktex.org/download
|
|||
|
# 验证
|
|||
|
latex --version
|
|||
|
# 第一次运行时 MiKTeX 会弹窗让你装缺失宏包,点“Install”即可。
|
|||
|
```
|
|||
|
|
|||
|

|
|||
|
|
|||
|

|
|||
|
|
|||
|

|
|||
|
|
|||
|
|
|||
|
|
|||
|
### 三、典型案例
|
|||
|
|
|||
|
```sh
|
|||
|
# 最简单的方框和圆
|
|||
|
manim -pql D:\dsWork\QingLong\AI\Manim\simple_example.py SimpleScene
|
|||
|
|
|||
|
# 平方差公式
|
|||
|
manim -pql D:\dsWork\QingLong\AI\Manim\difference_of_squares.py SquareDifference
|
|||
|
manim -pql D:\dsWork\QingLong\AI\Manim\difference_of_squares.py SquareDifference --flush_cache
|
|||
|
|
|||
|
# 【manim动画教程】
|
|||
|
|
|||
|
# https://www.cnblogs.com/wang_yb/p/18541513
|
|||
|
https://url11.ctfile.com/d/45455611-64751047-a5be65?p=6872
|
|||
|
|
|||
|
完整的代码共享在网盘中(transform.py),
|
|||
|
下载地址: 完整代码 (访问密码: 6872)
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
|