Issue
hy, i have a very equal problem to the problem shown here ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly.
I'm using a jetson Nano (ubuntu 18.04).
Error
Building wheel for opencv-python (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /home/christopher/heartkillayolotest2/heartkillayolotest2/bin/python /home/christopher/heartkillayolotest2/heartkillayolotest2/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpwort0shc cwd: /tmp/pip-install-g68zdlf0/opencv-python Complete output (9 lines): File "/tmp/pip-build-env-1b_l6sbo/overlay/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup cmkr = cmaker.CMaker(cmake_executable) File "/tmp/pip-build-env-1b_l6sbo/overlay/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in init self.cmake_version = get_cmake_version(self.cmake_executable) File "/tmp/pip-build-env-1b_l6sbo/overlay/lib/python3.6/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable) 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 tried this to solve the problem but it did not help:
(heartkillayolotest2)christopher@ccz:~/heartkillayolotest2/heartkillayolotest2$ pip3 install --upgrade pip Requirement already up-to-date: pip in ./lib/python3.6/site-packages (20.2.3)
and
(heartkillayolotest2) christopher@ccz:~/heartkillayolotest2/heartkillayolotest2/yolo-v3$ pip3 install --upgrade pip Requirement already up-to-date: pip in /home/christopher/heartkillayolotest2/heartkillayolotest2/lib/python3.6/site-packages (20.2.3)
Unfortunatelly the error still occurs.
Can somebody help me?
Solution
You are using Jetson Nano which is a arm64
board. There are no pre-built wheels for ARM architecture for opencv-python
. Due to this, pip
will attempt to build the package from sources. This will not succeed, because there is a known issue with the cmake
dependency which is needed for the build. You can check these issues for more info:
- cmake: https://github.com/scikit-build/cmake-python-distributions/issues/115
- opencv-python: https://github.com/skvark/opencv-python/issues/366
Currently, you can't build OpenCV's Python bindings via the opencv-python
package on ARM architecture systems due to the cmake
issue. Meanwhile you can follow the official OpenCV documentation to install OpenCV Python bindings from source: https://docs.opencv.org/master/d2/de6/tutorial_py_setup_in_ubuntu.html
Note that the accepted answer is not correct. pip
will install the build dependencies automatically (and cython
is not needed) given that your pip
version is greater than 19.0.
Answered By - skvark