python pyautogui AttributeError: module 'pyscreeze' has no attribute 'locateOnWindow'

发布时间 2023-10-12 08:54:23作者: liwenchao1995

python pyautogui AttributeError: module 'pyscreeze' has no attribute 'locateOnWindow'

安装好pyautogui 后测试脚本报错如标题
这个报错百度查询是版本过高导致的,于是尝试降低版本解决

#卸载原先版本
pip uninstall pyautogui

#安装指定版本
pip install -i https://mirrors.aliyun.com/pypi/simple/  pyautogui==0.9.50

然后进行测试发现可以了
pyautogui 的起步可以参考 pyautogui快速起步