I am trying to open image with explicit package referncing
import PIL
image = PIL.Image.open(file_path)
Unfortunately, SOMETIMES it complains
AttributeError: module 'PIL' has no attribute 'Image'
The point is in other script it worked for me this way.
UPDATE
Printing PIL.__file__
causes the same exception (but for attribute __file__
).
Seeing PIL
in debugger shows