pyautogui screenshot command is not working

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).

Upvotes: 2

Views: 3329

Answers (3)

CarryOnWithPrabh
CarryOnWithPrabh

Reputation: 1

Try to upgrade your PyAutoGui module using the following command:

pip install pyautogui --upgrade

I hope it helps you!

Upvotes: 0

Red
Red

Reputation: 27547

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

pip install Pillow --upgrade

Upvotes: 1

Anes Ait Hammou
Anes Ait Hammou

Reputation: 1

Just install Pillow package using pip:

pip install Pillow

or

pip3 install Pillow

Upvotes: 0

Related Questions