Skip to content

ImportError: Imageio Pillow requires Pillow, not PIL!  #748

Closed

Description

@Swiffers

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!

Activity

  1. tburrows13 commented on Mar 18, 2018

    @tburrows13
    Collaborator

    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.

  2. Swiffers commented on Mar 19, 2018

    @Swiffers
    Author

    It seems to be installed

    > sudo pip install pillow
    Requirement already satisfied: pillow in /usr/lib64/python2.7/site-packages
    
  3. tburrows13 commented on Mar 19, 2018

    @tburrows13
    Collaborator

    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.

  4. Swiffers commented on Mar 19, 2018

    @Swiffers
    Author

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

  5. chrischma commented on Apr 20, 2022

    @chrischma

    For anyone who stumbles about this problem aswell, this worked for me:
    danijar/handout#22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions