当试图在python中运行简单的animation example code时,出现一个我无法解决的错误。matplotlib.animation错误 - 系统找不到指定的文件
Traceback (most recent call last):
File "D:/CG/dynamic_image2.py", line 29, in <module>
ani.save('dynamic_images.mp4')
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
我发现了类似情况(link1,link2),但我仍然不知道如何解决我的...
我使用: 的Python 2.7.2 | EPD 7.2-2(32位)| (默认,2011年9月14日,11:02:05)[win32上的[MSC v.1500 32位(Intel)]]
我希望有人能帮助我!
我发现我可以运行代码并获得动画,如果我从** C更改行163:\ Python27 \ LIB \站点包\ matplotlib \ animation.py **从'proc等于POPEN (命令,shell = False,stdout = PIPE,stderr = PIPE)'到'proc = Popen(命令,shell = True,stdout = PIPE,stderr = PIPE)'。 – carla 2012-02-10 14:37:15
但是,我不确定** animation.py **文件中的这种更改是否“安全”... [更多信息](http://docs.python.org/library/subprocess.html#frequently -used-arguments) – carla 2012-02-10 14:48:13