When I run the code, it actually produces a working GIF as you can see here.
According to this Github Issue, installing ImageMagick should fix this. I've tried and the warning message is gone. And the resulting GIF seems the same.