At the very last cell in sgd-intro.ipynb, it’s intended to visualize learning process of SGD.
But when I run it as it is, the animation gets error.
ani = animation.FuncAnimation(fig, animate, np.arange(0, 40), interval=100)
ani
RuntimeError Traceback (most recent call last)
/home/ubuntu/anaconda2/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj)
309 method = get_real_method(obj, self.print_method)
310 if method is not None:
--> 311 return method()
312 return None
313 else:
/home/ubuntu/anaconda2/lib/python2.7/site-packages/matplotlib/animation.pyc in _repr_html_(self)
1007 fmt = rcParams['animation.html']
1008 if fmt == 'html5':
-> 1009 return self.to_html5_video()
1010
1011
/home/ubuntu/anaconda2/lib/python2.7/site-packages/matplotlib/animation.pyc in to_html5_video(self)
977 # We create a writer manually so that we can get the
978 # appropriate size for the tag
--> 979 Writer = writers[rcParams['animation.writer']]
980 writer = Writer(codec='h264',
981 bitrate=rcParams['animation.bitrate'],
/home/ubuntu/anaconda2/lib/python2.7/site-packages/matplotlib/animation.pyc in __getitem__(self, name)
87 def __getitem__(self, name):
88 if not self.avail:
---> 89 raise RuntimeError("No MovieWriters available!")
90 return self.avail[name]
91
RuntimeError: No MovieWriters available!
I found a solution here and it says that I should do:
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg
But the last line did not get through. Is there any other work around?