Closed roomrys closed 5 months ago
This is now resolved with #1724 + #1726 + https://github.com/talmolab/conda_packages/pull/2, which combined allow us to use the conda-forge::opencv
package up to 4.8.x. In addition to getting rid of the PyPI version of opencv-python
, this conda package also ships with ffmpeg and contrib. It also shims opencv-python
, opencv-python-headless
and the contrib variants so the PyPI versions don't get pulled in.
Note: We still need to move the new sleap::tensorflow
package from sleap/label/dev
to sleap/label/main
when we release 1.4.0, but for now, this new setup works like this using the current environment.yml
.
With some changes to our dependencies from this commit (PR #1623), we now have less restrictions on the version/flavor of
opencv
that is pulled in from our dependencies. Which is great!But, with great power comes great responsibility - and the dependency range on
opencv
is now giving pypi too much freedom/power to decide which version ofopencv
to use. In fact, now we run into errors when just trying to importopencv
!The problem here could be two things:
opencv
is wrong and we need to specifyopencv-contrib-python<4.7.0
in the pypi requirments. https://github.com/talmolab/sleap/blob/eb147646a79d057b508d7cbfa8f4c5e158601104/pypi_requirements.txt#L14opencv
and pins the wrong (or too broad) range foropencv
.The solution would be to first try pinning the desired version of
opencv-contrib-python<4.7.0
in ourpypi_requirements.txt
and see if the building the pypi wheel now works (checkout how we build it in our actions to test it yourself manually). If that doesn't work, it's going to get messy - we need to find which one of our dependencies requires a conflicting version of opencv and basically figure out a way around this.