BigTim
BigTim

Reputation: 27

Python pillow module not importing properly

I'm using the Python pillow module, but every time I try to import it and use a function, it gives me an error. Here is some code to reproduce the error.

import PIL

PIL.ImageGrab.grab()

Upvotes: 0

Views: 66

Answers (1)

Glatinis
Glatinis

Reputation: 347

You have to use from to import from PIL.

from PIL import ImageGrab

ImageGrab.grab()

Upvotes: 1

Related Questions