← All tasks
pythonopencv/opencv-python #775Not a task: not reproduced

Error building on MacOS

envgap__opencv__opencv-python-775

01 / FAILURE SIGNATURE

As reported upstream

ERROR: Cannot install numpy==1.21.2 and numpy==1.21.4 because these package versions have conflicting dependencies.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
339bca572ecd866b56df1f61214cbf03c5f276f2
Manifest
pyproject.toml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

opencv/opencv-python #775 · read the original issue
### 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



 - [X] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)

   <!--



   Use Q&A forums such as https://answers.opencv.org/questions/ and https://stackoverflow.com/ and other communities

   to discuss problems. Tickets without real issue statements related to this build toolchain will be closed.



   -->

 - [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)

   <!--



   If you have some OpenCV bug report which needs to fixed in the C++ code, 

   please report issue to the OpenCV repository: 



   https://github.com/opencv/opencv/issues



   See also:



   * OpenCV documentation: https://docs.opencv.org

   * OpenCV FAQ page: https://github.com/opencv/opencv/wiki/FAQ

   * OpenCV forum: https://answers.opencv.org

   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv



   -->

 - [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``



##### 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).
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]