Skip to content

[Request] Add ARM/AArch64 whl for opencv-python-headless==4.4.0.46 #473

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

Open
LukeIreland1 opened this issue Apr 28, 2021 · 10 comments
Open
Assignees

Comments

@LukeIreland1
Copy link

Long story short, the numpy dependency for TF 2.3.x (<1.19.0) means that we have to use this version of opencv-python-headless to avoid it reinstalling numpy, and currently have to build this from source which takes a very long time.

Adding this particular whl would save us (ONCPUML @ Arm) a huge amount of time before we eventually move to TF 2.5.x. I'm happy to build and push myself, but I don't mind how it gets done.

@sergregory sergregory self-assigned this Apr 28, 2021
@sergregory
Copy link
Collaborator

Hi @LukeIreland1 I'll take a look at what I can do with that. Probably we can set fewer restrictions on the numpy version as you've mentioned you were able to compile from sources with <1.19.0

@LukeIreland1
Copy link
Author

LukeIreland1 commented Apr 29, 2021

The docker recipe is with Ubuntu 20.04, GCC 9 (TF doesn't support GCC10 yet), Python 3.8, Numpy 1.18.4 and of course opencv-python-headless 4.4.0.46.

Your idea would also solve the problem, with a bonus that we can use the latest version!

@LukeIreland1
Copy link
Author

Any updates?

@JoseMoreville
Copy link

JoseMoreville commented Jun 9, 2021

Hi! I'm having the same issue with MAC M1 chip and i was wondering if there is any update

Problem with the CMake installation, aborting build. CMake executable is cmake
----------------------------------------
ERROR: Failed building wheel for cmake
Building wheel for pip (PEP 517): started
Building wheel for pip (PEP 517): finished with status 'done'
Created wheel for pip: filename=pip-21.1.2-py3-none-any.whl size=1548016 sha256=0d4277ef88302462bd99da4a69736432e62d68ab9e6dd241f427d0a50318a5d9
Stored in directory: /Users/hades/Library/Caches/pip/wheels/a2/ce/31/b392aede8a115524ad9dff45e094fb3a48c15eef1d3338e2f8
Building wheel for packaging (PEP 517): started
Building wheel for packaging (PEP 517): finished with status 'done'
Created wheel for packaging: filename=packaging-20.9-py2.py3-none-any.whl size=40891 sha256=5e26f152646c6467a7a0cbbc702999a215f73d2a9548ec9940badc5ec0af4e26
Stored in directory: /Users/hades/Library/Caches/pip/wheels/65/ab/5b/83dbc6a48fc7cf74c19b52a8bbcc444f2a1a35c38235d83b66
Building wheel for setuptools (PEP 517): started
Building wheel for setuptools (PEP 517): finished with status 'done'
Created wheel for setuptools: filename=setuptools-57.0.0-py3-none-any.whl size=821665 sha256=c2a1407a3a3a8594fabf0010b9a57c6a0852a96c952890125e606c4fa07c9ef0
Stored in directory: /Users/hades/Library/Caches/pip/wheels/1f/6f/84/f79c03348267aa19978c7896b4d5e0400666a8c1e8c6fadcd5
Successfully built pip packaging setuptools
Failed to build numpy cmake
ERROR: Could not build wheels for numpy, cmake which use PEP 517 and cannot be installed directly

@LukeIreland1
Copy link
Author

Hi! I'm having the same issue with MAC M1 chip and i was wondering if there is any update

It looks like your issue is actually that you can't build a cmake wheel. Do you definitely have cmake installed?

@JoseMoreville
Copy link

Hi! I'm having the same issue with MAC M1 chip and i was wondering if there is any update

It looks like your issue is actually that you can't build a cmake wheel. Do you definitely have cmake installed?

@LukeIreland1  not sure, i don't remember If it was installed by brew or pip

@LukeIreland1
Copy link
Author

@LukeIreland1  not sure, i don't remember If it was installed by brew or pip

which cmake should tell you (probably). I have no experience with the cmake pip package, but I've had no issue (with cmake) using a normal package manager like brew, yum, or apt.

@LukeIreland1
Copy link
Author

It looks like my team's docker image releases will include TF 2.5 sooner than the numpy requirement for the latest opencv-python-headless will change, or sooner than a whl for opencv-python-headless 4.4.0.46 will be added in any case.

@JoseMoreville
Copy link

It looks like my team's docker image releases will include TF 2.5 sooner than the numpy requirement for the latest opencv-python-headless will change, or sooner than a whl for opencv-python-headless 4.4.0.46 will be added in any case.

I managed to make it work with mini forge, conda also installing cmake cpython and cython.
For some reason that worked but i still need to check. It might be thanks to Rosseta 2.
It still took me a while to solve all the issues that cv2 gives when importing.
I'm not 100% of the steps but I'll try to reproduce the steps on other account or device to make a small "guide"

@LukeIreland1
Copy link
Author

I managed to make it work with mini forge, conda also installing cmake cpython and cython.
For some reason that worked but i still need to check. It might be thanks to Rosseta 2.
It still took me a while to solve all the issues that cv2 gives when importing.
I'm not 100% of the steps but I'll try to reproduce the steps on other account or device to make a small "guide"

Yeah, this version installs fine, but then you obviously must build it from source which takes forever (probably the majority of the docker build time for us).

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

3 participants