我正在尝试在 python 中使用动画类并且该save.animation
函数有问题。其他问题已经让发布者添加了一个名为ffmpeg.exe
python 路径的应用程序来解决问题。
不幸的是,我真的不明白“在python路径中添加一些东西”是什么意思,也无法通过在线搜索来弄清楚。
有人愿意开导我吗?将不胜感激!
问题是在运行我的代码时,该行:
anim.save('HAMILTONIAN.mp4',fps=5, codec=None, clear_temp=True,
frame_prefix='_tmp')
产生错误:
Traceback (most recent call last):
File "Z:\desktop\Project\bhmqntm-code\HamiltonianMovie(points_reducedtsegs).py", line 75, in <module>
anim.save('HAMILTONIAN.mp4',fps=5, codec=None, clear_temp=True, frame_prefix='_tmp')
File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 127, in save
self._make_movie(filename, fps, codec, frame_prefix)
File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 164, in _make_movie
stdout=PIPE, stderr=PIPE)
File "C:\Python27\lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified