You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: Imageio Pillow requires Pillow, not PIL! #748
Traceback (most recent call last):
File "./script.py", line 255, in add_watermark
watermark = (ImageClip("./watermark.png")
File "/usr/lib/python2.7/site-packages/moviepy/video/VideoClip.py", line 968, in __init__
img = imread(img)
File "/usr/lib/python2.7/site-packages/imageio/core/functions.py", line 185, in imread
reader = read(uri, format, 'i', **kwargs)
File "/usr/lib/python2.7/site-packages/imageio/core/functions.py", line 105, in get_reader
format = formats.search_read_format(request)
File "/usr/lib/python2.7/site-packages/imageio/core/format.py", line 660, in search_read_format
if format.can_read(request):
File "/usr/lib/python2.7/site-packages/imageio/core/format.py", line 189, in can_read
return self._can_read(request)
File "/usr/lib/python2.7/site-packages/imageio/plugins/pillow.py", line 57, in _can_read
Image = self._init_pillow()
File "/usr/lib/python2.7/site-packages/imageio/plugins/pillow.py", line 43, in _init_pillow
raise ImportError('Imageio Pillow requires Pillow, not PIL!')
ImportError: Imageio Pillow requires Pillow, not PIL!
Well presumable you only have PIL installed, and not Pillow. If you run pip list, presumably Pillow is not listed. Run pip install pillow to install it.
FYI, PIL is the Python Imaging Library, which hasn't been updated since 2011. Pillow is a fork of PIL, which is regularly updated, and should be used instead.
I’m no expert, but in your original post, the location was /usr/lib/python2.7/ but in your pip command, the location is /usr/lib64/python2.7/. I’m guessing you have 2 installs of python on your system, one 32-bit and one 64-bit.
Activity
tburrows13 commentedon Mar 18, 2018
Well presumable you only have PIL installed, and not Pillow. If you run
pip list, presumably Pillow is not listed. Runpip install pillowto install it.FYI, PIL is the Python Imaging Library, which hasn't been updated since 2011. Pillow is a fork of PIL, which is regularly updated, and should be used instead.
Swiffers commentedon Mar 19, 2018
It seems to be installed
tburrows13 commentedon Mar 19, 2018
I’m no expert, but in your original post, the location was
/usr/lib/python2.7/but in your pip command, the location is/usr/lib64/python2.7/. I’m guessing you have 2 installs of python on your system, one 32-bit and one 64-bit.Swiffers commentedon Mar 19, 2018
@tburrows13 Well spotted, I solved the issue by running:
pip install --target=/usr/lib/python2.7/site-packages/ --upgrade pillowchrischma commentedon Apr 20, 2022
For anyone who stumbles about this problem aswell, this worked for me:
danijar/handout#22