Files
dsProject/dsLightRag/Doc/7、安装Manim.md
2025-08-14 15:45:08 +08:00

64 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 一、安装步骤
```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”即可。
```
![](https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/%7Byear%7D/%7Bmonth%7D/%7Bmd5%7D.%7BextName%7D/20250803075529788.png)
![](https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/%7Byear%7D/%7Bmonth%7D/%7Bmd5%7D.%7BextName%7D/20250803075800743.png)
![](https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/%7Byear%7D/%7Bmonth%7D/%7Bmd5%7D.%7BextName%7D/20250803074105059.png)
### 三、典型案例
```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)
```