How to Solve NameError: name 'image' is not defined -- PIL

Solution: Import the 'image' module

To Solve the error, add the following line to the top of your code.

from PIL import image

 

For more information:
Python PIL image