I made a simple example of taking a screenshot. I debugged this, but there was an error.
cord
import pyautogui
import PIL
pyautogui.screenshot('screenshot.png')
error
The Pillow package is required to use this function.
I've already set up a pillow and version is 9.2.0(lastest version) I'm using python 3.9.12 My Python version is compatible with the Pillow version.
I tried Pip install fill, pip install fill --upgrade, and so on But it hasn't been fixed.
Requirement already satisfied: Pillow in d:\anaconda3\lib\site-packages (9.2.0)
Is there a way to fix it?
CodePudding user response:
I've just installed everything new and it's fixed!
CodePudding user response:
Try this, it should work perfectly on my side.
import pyautogui
myScreenshot = pyautogui.screenshot()
myScreenshot.save(r'D:\\image.png')