Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Swiffers opened this issue Mar 18, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@Swiffers
Copy link

commented Mar 18, 2018

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!
@almarklein

This comment has been minimized.

Copy link
Member

commented Mar 18, 2018

Hi! It looks like you've installed PIL instead of Pillow. If this is not the case, please let me know.

@Swiffers

This comment has been minimized.

Copy link
Author

commented Mar 19, 2018

It seems to be installed

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

This comment has been minimized.

Copy link
Member

commented Mar 19, 2018

What does this give you?

>> import PIL
>> PIL
>> PIL.VERSION
>> PIL.PILLOW_VERSION
@Swiffers

This comment has been minimized.

Copy link
Author

commented Mar 19, 2018

Somehow pillow was installed in /usr/lib64/python2.7/site-packages/
But python was looking for it in /usr/lib/python2.7/site-packages/

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

@Swiffers Swiffers closed this Mar 19, 2018

@almarklein

This comment has been minimized.

Copy link
Member

commented Mar 19, 2018

Odd, but glad that it is now fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.