Search code examples
pythonpython-imaging-librarypython-imageio

Imageio Pillow plugin requires Pillow lib


Instead of:

scipy.misc.imsave(category + '/' + str(i) + '.jpg', image) 

I am using:

imageio.imwrite(category + '/' + str(i) + '.jpg', image)

And it's giving me the following error:

error in image: 6078 - Imageio Pillow plugin requires Pillow lib.

Pillow is installed

What should I look into?


Solution

  • I believe this could happen due to one of these reasons:

    • You have two versions of python
    • You are using a virtual environment created with conda and you're installing imageio using pip.

    Either way, you can follow these steps to solve your issue:

    • Create a conda virtual environment. The following command will create a virtual environment called env:
    conda create -n env
    
    • Activate the virtual environment using:
    conda activate env
    
    • Install imageio using:
    conda install -c anaconda pillow