I'm trying to optimize a gif using pygifsicle's optimize function, working in the Colab environment. I've used !pip install pygifscile
which successfully installs pygifsicle-1.0.1. However whether I use import pygifsicle
or from pygifsicle import optimize
I still get the error:
FileNotFoundError: [Errno 2] No such file or directory: 'gifsicle': 'gifsicle'
I understand that gifsicle is a prerequesite for pygifsicle, how can I install it in Colab?
SOLUTION:
Realizing that Colab runs Ubuntu command, I simply ran
!sudo apt-get install gifsicle
after my cell:from pygifsicle import optimize
, and can now call the optimize function with no issues!