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

compile error in m1 chip with numpy version #433

Closed
stereo720712 opened this issue Jan 5, 2021 · 2 comments
Closed

compile error in m1 chip with numpy version #433

stereo720712 opened this issue Jan 5, 2021 · 2 comments

Comments

@stereo720712
Copy link

Expected behaviour

Should compile completed

Write here how did you expect the library to function.
I need to install opencv-python with Tensorflow-macos env

Actual behaviour

in opencv-python45 source code
pip wheel . --verbose to compile

Error

ERROR: Command errored out with exit status 1: /Users/sean/Documents/sysvenv/tf24v/bin/python3 /Users/sean/Documents/sysvenv/tf24v/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/gy/jzs3xnwd1z3203d75y_31nxc0000gn/T/pip-build-env-en64krht/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"'' 'numpy==1.19.3; python_version>='"'"'3.9'"'"'' Check the logs for full command output.

it lookalike the bumpy version problem.
But In Tensorflow-macos it it 1.8.5 and python is 3.8
Does anynoe have the same problem?
thanks

@skvark
Copy link
Member

skvark commented Jan 5, 2021

The m1 arm chip is a pretty new thing, pyproject.toml hasn't been adjusted for it. There are no macOS arm wheels for either opencv-python or numpy so you need to use the non-native wheels or build from source (see below). Please check: #418 (comment)

If you wish to compile from source, see: https://github.com/skvark/opencv-python#source-distributions

The command you need is: pip install --no-binary :all: opencv-python

That will compile both numpy and opencv-python from sources.

Make sure you have the latest pip version in use.

@skvark
Copy link
Member

skvark commented Jan 5, 2021

Please refer to #429 for more info. I believe it might take some time before you can use the native numpy and opencv-python arm64 version on Apple Silicon.

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

2 participants