0

I'm trying to use pyautogui to find image in my screen, with confidence params set. But it's asking me to install OpenCV, since I've already have opencv-python installed.

My code is like this:

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

The full error message:

    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.

My stack is:

  • Virtual Env
  • Python 3
  • Mac OS
Lai32290
  • 8,062
  • 19
  • 65
  • 99
  • Does this answer your question? [Documentation says to use a confidence parameter, but it throws an error](https://stackoverflow.com/questions/57832850/documentation-says-to-use-a-confidence-parameter-but-it-throws-an-error) – JayRizzo Apr 20 '22 at 19:18

1 Answers1

0

I just figured out that I had opencv-python installed but I didn't have opencv installed.

Lai32290
  • 8,062
  • 19
  • 65
  • 99