Why can't Python import Image from PIL?

后端 未结 17 1835
执念已碎
执念已碎 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

    had the same error while using pytorch code which had deprecated pillow code. since PILLOW_VERSION was deprecated, i worked around it by:

    Simply duplicating the _version file and renaming it as PILLOW_VERSION.py in the same folder.

    worked for me

提交回复
热议问题