简体   繁体   English

pyautogui 截图命令不起作用

[英]pyautogui screenshot command is not working

import pyautogui

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

在此处输入图像描述

I don't know what I did wrong but any similar command is not working (I have installed pyautogui ).我不知道我做错了什么,但任何类似的命令都不起作用(我已经安装了pyautogui )。

If you already have PIL (Pillow) installed, you'll need to upgrade it via the command prompt command如果您已经安装了PIL (Pillow) ,则需要通过命令提示符命令对其进行升级

pip install Pillow --upgrade

Just install Pillow package using pip:只需使用 pip 安装 Pillow package:

pip install Pillow

or或者

pip3 install Pillow

Try to upgrade your PyAutoGui module using the following command:尝试使用以下命令升级 PyAutoGui 模块:

pip install pyautogui --upgrade

I hope it helps you!我希望它能帮助你!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM