Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation is stuck at building wheel #391

Closed
3 of 4 tasks
Abhranta opened this issue Sep 22, 2020 · 14 comments
Closed
3 of 4 tasks

installation is stuck at building wheel #391

Abhranta opened this issue Sep 22, 2020 · 14 comments

Comments

@Abhranta
Copy link

Abhranta commented Sep 22, 2020

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.)
  • 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)
  • 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")
  • I'm using the latest version of opencv-python
@TheDudeThatCode
Copy link

TheDudeThatCode commented Sep 23, 2020

@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 🙏

@siddharthcb
Copy link

siddharthcb commented Sep 23, 2020

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

@skvark
Copy link
Member

skvark commented Sep 23, 2020

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 skvark closed this as completed Sep 23, 2020
@siddharthcb
Copy link

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

@skvark
Copy link
Member

skvark commented Sep 23, 2020

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

@Patrickctyyx
Copy link

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

@ArturoHurtado7
Copy link

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

thanks bro, this worked for me

@yoyojacky
Copy link

just:

pip install opencv-python==4.5.3.56 

it works fine for me.

@makarpeter98
Copy link

Thanks man!
I spend my last 4-5 days and some nights to find the solution.
I need the OCV to my thesis.

just:

pip install opencv-python==4.5.3.56 

it works fine for me.

@jiachengc
Copy link

just:

pip install opencv-python==4.5.3.56 

it works fine for me.

You save my life

@VivianChan1998
Copy link

just:

pip install opencv-python==4.5.3.56 

it works fine for me.

Weekend saved. Thanks

@charliehoward
Copy link

I'm getting this with 4.8.1.78.
Building wheel for opencv-python (pyproject.toml) ... has been going for over an hour

@Gnonymous
Copy link

just:

pip install opencv-python==4.5.3.56 

it works fine for me.

thank you! it also works for me
As blew is what l have done:

  1. conda create -n name python=3.8 someone said python3.8 is necessary
  2. pip3 install opencv-python==4.5.3.56

@charliehoward
Copy link

just:

pip install opencv-python==4.5.3.56 

it works fine for me.

thank you! it also works for me As blew is what l have done:

1. `conda create -n name python=3.8` someone said python3.8 is necessary

2. `pip3 install opencv-python==4.5.3.56`

4.5.3.56 does install very quickly however I get this error when running my script
Traceback (most recent call last):
File "/home/obd/.local/lib/python3.9/site-packages/numpy/init.py", line 135, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
Traceback (most recent call last):
File "/home/obd/DRDS/main.py", line 18, in
import cv2
File "/home/obd/.local/lib/python3.9/site-packages/cv2/init.py", line 5, in
from .cv2 import *
ImportError: numpy.core.multiarray failed to import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests