Skip to content

Error building on MacOS #775

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

Closed
4 tasks done
TheCleric opened this issue Jan 11, 2023 · 0 comments · Fixed by #776
Closed
4 tasks done

Error building on MacOS #775

TheCleric opened this issue Jan 11, 2023 · 0 comments · Fixed by #776
Assignees
Labels

Comments

@TheCleric
Copy link
Contributor

Expected behaviour

opencv-python builds on MacOS

Actual behaviour

Receive an error stating:

ERROR: Cannot install numpy==1.21.2 and numpy==1.21.4 because these package versions have conflicting dependencies.

  The conflict is caused by:
      The user requested numpy==1.21.2
      The user requested numpy==1.21.4
  • operating system == 12.6
  • architecture (e.g. x86) == x86
  • opencv-python version == 4.7.0.68 (commit 339bca5 on 4.x branch)
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
Fix

To me, this looks like an issue in the pyroject.toml requires array, with conflicting versions if your are running python >= 3.10 on Mac.

Specifically these lines:

  "numpy==1.21.2; python_version>='3.10'",
  "numpy==1.21.4; python_version>='3.10' and platform_system=='Darwin'",

should probably be:

  "numpy==1.21.2; python_version>='3.10' and platform_system!='Darwin'",
  "numpy==1.21.4; python_version>='3.10' and platform_system=='Darwin'",

Otherwise when python >= 3.10 and platform_system == "Darwin" it will want both numpy 1.21.2 (to satisfy the first condition) and numpy 1.21.4 (to satisfy the second).

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

Successfully merging a pull request may close this issue.

2 participants