manim-kindergarten / manim_sandbox

manim-kindergarten's communal repository
MIT License
451 stars 77 forks source link

When I run the file `test_present_style.py`, I got NameError: name 'Text' is not defined #4

Closed KenyonY closed 4 years ago

KenyonY commented 4 years ago

我尝试运行https://github.com/manim-kindergarten/manim_sandbox/blob/master/videos/HomeworkVol04/test_present_style.py,抛错name 'Text' is not defined。 我的manim应该正确安装了,可以正常运行3b1b/manim/example_scenes.py中的相关脚本。不知报错的Text类应位于何处?

TonyCrane commented 4 years ago

你的manim是否使用的是最新的源码,Text类在2019年8月5日后才有,位置在manim/manimlib/mobject/svg/text_mobject.py

KenyonY commented 4 years ago

谢谢你的解答。我一开始是使用pip进行安装的,刚刚在PyPI上查看了manimlib最新版本发布于2019.7.8。 另外看到https://github.com/manim-kindergarten/manim_sandbox/blob/master/documents/manim%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98v2.2.pdf里面就提到了不要用pip直接安装~