Why can't Python import Image from PIL?

后端 未结 17 1821
执念已碎
执念已碎 2020-12-03 06:49

The single line that I am trying to run is the following:

from PIL import Image

However simple this may seem, it gives an error:

         


        
17条回答
  •  春和景丽
    2020-12-03 06:59

    I had the same issue, and did this to fix it:

    1. In command prompt

      pip install Pillow ##
      
    2. Ensure that you use

      from PIL import Image
      

    I in Image has to be capital. That was the issue in my case.

提交回复
热议问题