Failed building wheel for opencv-python
Running setup.py clean for opencv-python
Failed to build opencv-python
Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
new environment 에 설치하는데 저런 오류가 발생합니다.
구글링 해보니, 대부분 해결책이
pip install --upgrade pip setuptools wheel
이렇게 하고, 다시 아래처럼 install 하면 해결된다고 하는데요..
pip install opencv-python
전 첫번째 명령어도 실행하는데 오류가 발생합니다.
오류 내용은
File "c:\users\combr\pycharmprojects\mytest\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 405, in make
self._make_script(entry, filenames, options=options)
File "c:\users\combr\pycharmprojects\mytest\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 309, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "c:\users\combr\pycharmprojects\mytest\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 245, in _write_script
launcher = self._get_launcher('t')
File "c:\users\combr\pycharmprojects\mytest\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 384, in _get_launcher
result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
그래서 구글링 해보다가 찾은 해결책은
easy_install -U pip
이렇게 명령어를 날리니 아래와 같은 로그가 찍히면서 금방 끝나네요.
Searching for pip
Reading https://pypi.org/simple/pip/
Downloading https://files.pythonhosted.org/packages/4d/16/0a14ca596f30316efd412a60bdfac02a7259bf8673d4d917dc60b9a21812/pip-22.0.4-py3-none-any.whl#sha256=c6aca0f2f081363f689f041d90dab2a07a9a07fb840284db221
8117a52da800b
Best match: pip 22.0.4
Processing pip-22.0.4-py3-none-any.whl
Installing pip-22.0.4-py3-none-any.whl to c:\users\combr\pycharmprojects\mytest\venv\lib\site-packages
Adding pip 22.0.4 to easy-install.pth file
Installing pip-script.py script to C:\Users\combr\PycharmProjects\MyTest\venv\Scripts
Installing pip.exe script to C:\Users\combr\PycharmProjects\MyTest\venv\Scripts
Installing pip3-script.py script to C:\Users\combr\PycharmProjects\MyTest\venv\Scripts
Installing pip3.exe script to C:\Users\combr\PycharmProjects\MyTest\venv\Scripts
Installing pip3.9-script.py script to C:\Users\combr\PycharmProjects\MyTest\venv\Scripts
Installing pip3.9.exe script to C:\Users\combr\PycharmProjects\MyTest\venv\Scripts
Installed c:\users\combr\pycharmprojects\mytest\venv\lib\site-packages\pip-22.0.4-py3.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
그리고 다시 opencv 설치
pip install opencv-python
설치가 되었습니다.
'Python' 카테고리의 다른 글
[PyQT5] UI Designer 에서 Tab Widget 생성 하기 (0) | 2022.03.24 |
---|---|
[PyQT5] UI Designer 에서 리사이즈 시 같이 확장하기 (0) | 2022.03.24 |
[PyQT5] 처음부터 따라하기 #4. ui component binding (0) | 2022.03.17 |
[PyQT5] 처음부터 따라하기 #3. UI 파일을 Python에서 실행하기 (0) | 2022.03.17 |
[PyQT5] 처음부터 따라하기 #1. 프로젝트 생성 및 설치 (0) | 2022.03.16 |
댓글