Manim
执行:manim -p Logo.py ManimCELogo
Logo.py(官网的示例):
from manim import *
class ManimCELogo(Scene):
def construct(self):
self.camera.background_color = "#ece6e2"
logo_green = "#87c2a5"
logo_blue = "#525893"
logo_red = "#e07a5f"
logo_black = "#343434"
ds_m = MathTex(r"\mathbb{M}", fill_color=logo_black).scale(7)
ds_m.shift(2.25 * LEFT + 1.5 * UP)
circle = Circle(color=logo_green, fill_opacity=1).shift(LEFT)
square = Square(color=logo_blue, fill_opacity=1).shift(UP)
triangle = Triangle(color=logo_red, fill_opacity=1).shift(RIGHT)
logo = VGroup(triangle, square, circle, ds_m) # order matters
logo.move_to(ORIGIN)
self.add(logo)
错误:
ValueError: Your installation does not support converting .dvi files to SVG. Consider
updating dvisvgm to at least version 2.4. If this does not solve the problem, please
refer to our troubleshooting guide at:
https://docs.manim.community/en/stable/faq/general.html#my-installation-does-not-support-converting-pdf-to-svg-help
软件版本:
Python3.10.7
Manim Community v0.17.3
MiKTeX 23.4
ffmpeg
dvisvgm 2.4
这个错误提示是说你的安装环境不支持将.dvi文件转换为SVG格式。这通常是因为你的dvisvgm版本过低或者没有安装dvisvgm。
解决这个问题的方法是更新dvisvgm到至少版本2.4。你可以通过以下命令安装dvisvgm:
pip install dvisvgm
如果你已经安装了dvisvgm,但仍然遇到这个问题,可能需要更新dvisvgm的版本。你可以尝试通过以下命令更新dvisvgm的版本:
pip install --upgrade dvisvgm
如果问题仍然存在,请参考Manim的官方文档或者社区支持,以获取更多帮助。
另外,Manim的版本可能比较低,你可以考虑升级到最新版本以获得更好的支持和功能。你可以通过以下命令升级Manim:
pip install --upgrade manim
希望这些信息对你有帮助!如果你还有其他问题,请随时提问。