Khi cố gắng chạy một đơn giản animation example code trong python, tôi gặp lỗi mà tôi không thể giải quyết được.lỗi matplotlib.animation - Hệ thống không thể tìm thấy tệp được chỉ định
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
tôi thấy tình huống tương tự (link1, link2) nhưng tôi vẫn không biết làm thế nào để giải quyết tôi ...
Tôi đang sử dụng: Python 2.7.2 | EPD 7,2-2 (32 -bit) | (mặc định, ngày 14 tháng 9 năm 2011, 11:02:05) [MSC v.1500 32 bit (Intel)] trên win32
Tôi hy vọng ai đó có thể giúp tôi!
Tôi phát hiện ra mình có thể chạy mã và nhận hoạt ảnh, nếu tôi thay đổi dòng 163 từ ** C: \ Python27 \ Lib \ site-packages \ matplotlib \ animation.py ** từ 'proc = Popen (lệnh, shell = False, stdout = PIPE, stderr = PIPE) 'tới' proc = Popen (lệnh, shell = Đúng, stdout = PIPE, stderr = PIPE) '. – carla
Tuy nhiên, tôi không chắc chắn cách "an toàn" là thay đổi này trong tệp ** animation.py ** ... [thêm thông tin tại đây] (http://docs.python.org/library/subprocess.html#frequently đối số sử dụng) – carla