Why can't Python import Image from PIL?

后端 未结 17 1853
执念已碎
执念已碎 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 07:14

    what that worked for me:

    go to the fodler

    C:\Users\{YOUR PC USER NAME}\AppData\Local\Programs\Python\Python37-32\Lib\site-packages 
    

    and either delete or change the name of the PIL folder and DONE.

    had to do it after running

    pip uninstall PIL
    

    as other suggested yielded for me

    WARNING: Skipping PIL as it is not installed.
    

    But I am not sure about the consequences of removing that library so I will edit this post if I ever get into a problem because of that.

提交回复
热议问题