Python OpenCV installation error

cancel
Showing results for 
Search instead for 
Did you mean: 

Python OpenCV installation error

Jump to solution
5,504 Views
nilutpol_k
Contributor I

I am trying to install OpenCV package for Python on my 8MM NavQ Computer using pip package installer.

I am facing the following error:

Defaulting to user installation because normal site-packages is not writeable
Collecting opencv-python
Using cached opencv-python-4.4.0.44.tar.gz (88.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.17.3 in ./.local/lib/python3.8/site-packages (from opencv-python) (1.19.2)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/navq/.local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpr36bqijd
cwd: /tmp/pip-install-8_6xonp2/opencv-python
Complete output (9 lines):
File "/tmp/pip-build-env-sycby3dp/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
cmkr = cmaker.CMaker(cmake_executable)
File "/tmp/pip-build-env-sycby3dp/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 95, in __init__
self.cmake_version = get_cmake_version(self.cmake_executable)
File "/tmp/pip-build-env-sycby3dp/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 81, in get_cmake_version
raise SKBuildError(
Traceback (most recent call last):

Problem with the CMake installation, aborting build. CMake executable is cmake
----------------------------------------
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

 

I am having python 3.8.2 with Linux Ubuntu 20.04.1 LTS.

Command used : pip3 install opencv-python

I have tried to solve the issue with all possible solutions but still the issue is not resolved. Please help

 me out.

0 Kudos
1 Solution
5,492 Views
yokonav
Contributor III

Use this to install: sudo apt install python3-opencv

View solution in original post

1 Reply
5,493 Views
yokonav
Contributor III

Use this to install: sudo apt install python3-opencv

View solution in original post