opencv-python를 설치할 때 간혹 이런 오류를 만나곤한다. (주로 윈도우 환경에서 발견된다.)
Building windows wheels for Python 3.8 requires Microsoft Visual Studio 2022.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
Or with "Visual Studio 2019":
https://visualstudio.microsoft.com/vs/
Or with "Visual Studio 2022":
https://visualstudio.microsoft.com/vs/
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for opencv-contrib-python
Running setup.py clean for opencv-contrib-python
Failed to build opencv-contrib-python
ERROR: Could not build wheels for opencv-contrib-python which use PEP 517 and cannot be installed directly
일반적으로는 Visual Studio를 설치하면 해결되지만 Visual Studio를 설치해도 오류가 수정되는 경우가 있다. 이 경우에는
pip install --upgrade pip setuptools wheel
을 먼저 파이썬 패키지를 빌드, 설치, 관리하기 위한 도구를 먼저 설치해주면 해결됩니다.