Opencv-python: installation is stuck at building wheel

Created on 23 Sep 2020  ยท  7Comments  ยท  Source: opencv/opencv-python

Expected behaviour

I expected to module to install very fast.

Actual behaviour

Building wheel for opencv-python (PEP 517) takes forever to run.

Steps to reproduce

  • OS - ubuntu 18.04 LTS
  • architecture - x86
  • opencv-python version - 4.4.0.44
Issue submission checklist
  • [ ] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)

  • [x] I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)


  • [x] The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")

  • [x] I'm using the latest version of opencv-python

Most helpful comment

Met the same problem, solving by upgrade pip before install opencv, pip install --upgrade pip

All 7 comments

@Abhranta ok so coincidently I too faced the similar issue just now ๐Ÿ‘‡

I am a Windows 64 - bit user

image

  • When I checked on pypi.org, I came to know that, people who all are installing openCV they are installing the latest version that is released just 3 hours back ๐Ÿ‘‡

image


TEMPORARY SOLUTION โœ…

So for now you can download the previous version (i.e opencv-python 4.4.0.42) and it will work fine and your job gets done.

image

Hope this helps ๐Ÿ˜Š
Do drop a like if your issue gets solved by this.
Thank you ๐Ÿ™

hi @TheDudeThatCode ,
i tried installing the older version as you said but i am getting the same error still.
i am running on ubuntu 18.04, arm64.

python3.7 -m pip install opencv-python==4.4.0.42 Defaulting to user installation because normal site-packages is not writeable Collecting opencv-python==4.4.0.42 Using cached opencv-python-4.4.0.42.tar.gz (88.9 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Requirement already satisfied: numpy>=1.14.5 in ./.local/lib/python3.7/site-packages (from opencv-python==4.4.0.42) (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.7 /home/farbot/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp2mtq9r3_ cwd: /tmp/pip-install-88qrptpk/opencv-python Complete output (9 lines): File "/tmp/pip-build-env-xque07ot/overlay/lib/python3.7/site-packages/skbuild/setuptools_wrap.py", line 560, in setup cmkr = cmaker.CMaker(cmake_executable) File "/tmp/pip-build-env-xque07ot/overlay/lib/python3.7/site-packages/skbuild/cmaker.py", line 95, in __init__ self.cmake_version = get_cmake_version(self.cmake_executable) File "/tmp/pip-build-env-xque07ot/overlay/lib/python3.7/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

You can't install the packages because the builds were (and still are) in progress. Please pin your dependencies as @TheDudeThatCode wrote above. When builds are finished, you can safely upgrade (the new release contains only bug fixes and drops Python 3.5 support). The releases are usually ready when there are release notes at https://github.com/skvark/opencv-python/releases.

Build progress: https://ci.appveyor.com/project/skvark/opencv-python and https://travis-ci.com/github/skvark/opencv-python/builds

@siddharthcb This project does not support ARM platforms. Therefore your installation will always fail. Source build fails because cmake has issues with ARM platforms also.

@skvark is it possible to build from source for arm64?
what approach do you recommend for arm64?

If you manage to get the cmake dependency working (in pyproject.toml) then this project should build fine on arm64. Please see https://github.com/skvark/opencv-python/issues/366 for more info. Cmake is provided via this project: https://github.com/scikit-build/cmake-python-distributions

Met the same problem, solving by upgrade pip before install opencv, pip install --upgrade pip

Met the same problem, solving by upgrade pip before install opencv, pip install --upgrade pip

thanks bro, this worked for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chtsngn picture chtsngn  ยท  3Comments

lgvaz picture lgvaz  ยท  3Comments

milansoliya4210 picture milansoliya4210  ยท  5Comments

Domibor picture Domibor  ยท  4Comments

ES-Alexander picture ES-Alexander  ยท  5Comments