conda-forge / opencv-feedstock

A conda-smithy repository for opencv.
BSD 3-Clause "New" or "Revised" License
64 stars 59 forks source link

Impossible to install opencv==4.10.* with python==3.12, 3.11 and 3.10 #418

Closed traversaro closed 3 months ago

traversaro commented 3 months ago

Solution to issue cannot be found in the documentation.

Issue

The following command fails:

conda create -n test "opencv==4.10.*" "python==3.12.*"

with these error:

traversaro@IITBMP014LW012:~$ conda create -n test "opencv==4.10.*" "python==3.12.*"
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides _numpy_rc needed by numpy-2.0.0rc1-py310h515e003_0

Could not solve for environment specs
The following packages are incompatible
├─ opencv 4.10**  is installable with the potential options
│  ├─ opencv 4.10.0 would require
│  │  └─ py-opencv [4.10.0 headless_py310h59be988_0|4.10.0 headless_py311he415c94_0|...|4.10.0 qt6_py39h1b361a7_600], which requires
│  │     └─ numpy >=2.0.0rc.2,<3.0a0 , which requires
│  │        └─ _numpy_rc, which does not exist (perhaps a missing channel);
│  ├─ opencv 4.10.0 would require
│  │  └─ python_abi 3.8.* *_cp38, which can be installed;
│  └─ opencv 4.10.0 would require
│     └─ pypy3.9 >=7.3.15 , which can be installed;
└─ python 3.12**  is not installable because there are no viable options
   ├─ python [3.12.0|3.12.1|3.12.2|3.12.3] would require
   │  └─ python_abi 3.12.* *_cp312, which conflicts with any installable versions previously reported;
   └─ python 3.12.0rc3 would require
      └─ _python_rc, which does not exist (perhaps a missing channel).

Similarly, this fails with python 3.10 or 3.11 unless Python 3.8 or 3.9 is requested.

Installed packages

.

Environment info

.
traversaro commented 3 months ago

(I ended up here as OpenCV 4.9 can't be found correctly with Visual Studio 17.10, and OpenCV 4.10 was not installed for this issue, see https://github.com/robotology/robotology-superbuild/issues/1664 for the full investigation).

hmaarrfk commented 3 months ago

I think we accidentally left a pin_compatible('numpy') in there.

https://github.com/conda-forge/opencv-feedstock/blob/c6de8cc79c610e78327e326c7508dbd181ca2969/recipe/meta.yaml#L261

do you want to write a repodata patch and we can try?

hmaarrfk commented 3 months ago

@conda-forge-admin please rerender

conda-forge-webservices[bot] commented 3 months ago

Hi! This is the friendly automated conda-forge-webservice.

I just wanted to let you know that I started rerendering the recipe in conda-forge/opencv-feedstock#419.

traversaro commented 3 months ago

do you want to write a repodata patch and we can try?

Sorry, I just saw it now, but as you already handled it yourself, thanks!

traversaro commented 3 months ago

conda create -n test "opencv==4.10.*" "python==3.12.*" now works fine, thanks!