On an Anaconda set up, I want to run following simple code:
from PIL import Image
img = Image.open('test.webp')
This works on my Linux machine, but on Windows:
UserWarning: image file could not be identified because WEBP support not installed
warnings.warn(message)
---------------------------------------------------------------------------
UnidentifiedImageError Traceback (most recent call last)
<ipython-input-3-79ee787a81b3> in <module>
----> 1 img = Image.open('test.webp')
~\miniconda3\lib\site-packages\PIL\Image.py in open(fp, mode, formats)
3028 for message in accept_warnings:
3029 warnings.warn(message)
-> 3030 raise UnidentifiedImageError(
3031 "cannot identify image file %r" % (filename if filename else fp)
3032 )
UnidentifiedImageError: cannot identify image file 'test.webp'
I do have the libwebp
package installed, and libwebp.dll
is present in the Library\bin
directory of my Anaconda set up.
Any idea?