0

我正在按照教程的说明(https://talkingphysics.wordpress.com/2018/06/11/learning-how-to-animate-videos-using-manim-series-a-journey/)但是,当我打字

(manim37) C:\Users\PaKo>python3 C:\Users\PaKo\Desktop\Python\3blue_1brown\manim-master\extract_scene.py C:\Users\PaKo\Desktop\Python\3blue_1brown\manim-master\example_scenes.py
SquareToCircle -pl

我得到以下信息:(我正在使用 python 3.7)

Traceback (most recent call last):
File "C:\Users\PaKo\Desktop\Python\3blue_1brown\manim-master\extract_scene.py", line 299, in
main()
File "C:\Users\PaKo\Desktop\Python\3blue_1brown\manim-master\extract_scene.py", line 259, in main
module = get_module(config["file"])
File "C:\Users\PaKo\Desktop\Python\3blue_1brown\manim-master\extract_scene.py", line 254, in get_module
return importlib.import_module(module_name)
File "C:\Users\PaKo\Anaconda2\envs\manim36\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 941, in _find_and_load_unlocked
File "< frozen importlib._bootstrap >", line 219, in _call_with_frames_removed
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 941, in _find_and_load_unlocked
File "< frozen importlib._bootstrap >", line 219, in _call_with_frames_removed
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 941, in _find_and_load_unlocked
File "< frozen importlib._bootstrap >", line 219, in _call_with_frames_removed
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 941, in _find_and_load_unlocked
File "< frozen importlib._bootstrap >", line 219, in _call_with_frames_removed
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 941, in _find_and_load_unlocked
File "< frozen importlib._bootstrap >", line 219, in _call_with_frames_removed
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 941, in _find_and_load_unlocked
File "< frozen importlib._bootstrap >", line 219, in _call_with_frames_removed
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 941, in _find_and_load_unlocked
File "< frozen importlib._bootstrap >", line 219, in _call_with_frames_removed
File "< frozen importlib._bootstrap >", line 994, in _gcd_import
File "< frozen importlib._bootstrap >", line 971, in _find_and_load
File "< frozen importlib._bootstrap >", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'C:'

你能帮我解决这个问题,以便我可以可视化视频吗?提前谢谢你,

4

1 回答 1

0

你所说的教程是几个月前从你的帖子发布的,他们有一个通知:

Important Note:  These posts are based on an earlier version of manim which uses Python 2.7.  
The latest version of manim is using Python 3.  
To follow along with these posts, use Python 2.7 and the May 9, 2018 commit of manim.

我认为那里的说明已经过时了。

您现在不太可能还没有解决问题,但是为了后代,我将尝试回答您的问题:

如果您正确安装了 manim,那么您可能只是输入了错误的命令。运行 manim 的命令已更改,因此我建议cd-ing 进入您的 manim 安装目录(manim-master如果您从 github 下载)并运行:

python -m manim example_scenes.py SquareToCircle -pl 而不是您之前输入的内容。

也有可能您在使用 python2 运行时安装了 python3 版本的 manim。在这种情况下尝试python3代替。python

于 2019-05-27T17:23:41.563 回答