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:
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