pyautogui函数locateonscreen给出属性错误

问题描述

我正在尝试在脚本中实现pyautogui.LocateOnScreen()函数,但是在运行脚本后,它会不断给我这个错误

import pyautogui
pyautogui.LocateOnScreen('pics\cutwillow1edit.png')

>>>AttributeError: module 'pyautogui' has no attribute 'LocateOnScreen'

我又读了一个有同样问题的帖子:Pyautogui Screenshot Functions return AttributeError 'module' object has no attribute

我尝试了适用于该人的解决方案,但无济于事。 我还尝试过重新安装枕头,pyautogui并更新我的pip,但这些都没有帮助解决问题。

我不知道这是否重要,但我还安装了opencv-python。

我在Windows 10上。我的Python版本为3.7.2

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)