I am facing error in PIL

this is the error i am getting .

“Could not import PIL.Image. The use of load_img requires PIL.”

My code :
def preprocess_img(img):
img = image.load_img(img,target_size=(224,224))
img = np.expand_dims(img,axis=0)
#Normalisation
img = preprocess_input(img)
return img

img = preprocess_img(IMG_PATH+“1000268201_693b08cb0e.jpg”)
plt.imshow(img[0])

Install pillow using the following command,
pip install pillow

Run your code after installing it, and check if it works.

Happy Learning :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.