【问题标题】:PyAutoGui not identifying installed OpenCVPyAutoGui 无法识别已安装的 OpenCV
【发布时间】:2021-11-22 10:45:39
【问题描述】:

我正在尝试使用pyautogui 在我的屏幕中查找图像,并设置了confidence 参数。 但它要求我安装 OpenCV,因为我已经安装了 opencv-python

我的代码是这样的:

import pyautogui
location = pyautogui.locateOnScreen('123.png', confidence=1)

完整的错误信息:

    raise NotImplementedError('The confidence keyword argument is only available if OpenCV is installed.')
NotImplementedError: The confidence keyword argument is only available if OpenCV is installed.

我的堆栈是:

  • 虚拟环境
  • Python 3
  • Mac 操作系统

【问题讨论】:

    标签: python opencv pyautogui


    【解决方案1】:

    我刚刚发现我安装了opencv-python,但我没有安装opencv

    【讨论】:

      猜你喜欢
      • 2018-11-19
      • 2020-09-14
      • 2020-06-11
      • 2021-11-21
      • 2016-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多