pyautogui screenshot command is not working

Viewed 430
import pyautogui

myScreenshot = pyautogui.screenshot()
myScreenshot.save(r'C:\Users\"my user name"\PycharmProjects\"my project"\   name.png')

enter image description here

I don't know what I did wrong but any similar command is not working (I have installed pyautogui).

2 Answers

If you already have PIL (Pillow) installed, you'll need to upgrade it via the command prompt command

pip install Pillow --upgrade

Just install Pillow package using pip:

pip install Pillow

or

pip3 install Pillow
Related