Moviepy: ImportError: Imageio Pillow requires Pillow, not PIL!

Created on 18 Mar 2018  路  4Comments  路  Source: Zulko/moviepy

hi,

I'm falling into this error,

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!

Most helpful comment

@tburrows13 Well spotted, I solved the issue by running:
pip install --target=/usr/lib/python2.7/site-packages/ --upgrade pillow

All 4 comments

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.

It seems to be installed

> sudo pip install pillow
Requirement already satisfied: pillow in /usr/lib64/python2.7/site-packages

I鈥檓 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鈥檓 guessing you have 2 installs of python on your system, one 32-bit and one 64-bit.

@tburrows13 Well spotted, I solved the issue by running:
pip install --target=/usr/lib/python2.7/site-packages/ --upgrade pillow

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tburrows13 picture tburrows13  路  3Comments

TowelDude picture TowelDude  路  3Comments

RahulPrasad picture RahulPrasad  路  4Comments

Netherdrake picture Netherdrake  路  5Comments

PyB1l picture PyB1l  路  3Comments