我正在尝试使用 pyautogui,它给了我这个错误

I am trying to use pyautogui and its giving me this error

这是代码:

import pyautogui
btn = pyautogui.locateOnScreen("Screenshot_1.png")
pyautogui.moveTo()
pyautogui.doubleClick()

this is the error

我已经尝试重新安装了,但没有成功 工作

您必须安装 pillow。使用这个命令:

pip install Pillow