FS#70623 - python cv2 broken by recent versions of opencv and openexr

Attached to Project: Arch Linux
Opened by Ben (root) - Wednesday, 28 April 2021, 08:44 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 28 April 2021, 11:23 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Python cannot import the cv2 module with recent versions of opencv and openexr.

Additional info:

The last versions are:
- opencv-4.5.1-1-x86_64.pkg.tar.zst
- openexr-2.5.5-1-x86_64.pkg.tar.zst

Steps to reproduce:

$ python
Python 3.9.4 (default, Apr 20 2021, 15:51:38)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libIlmImf-2_5.so.25: cannot open shared object file: No such file or directory

Steps to downgrade after the introduction of imath:

cd /var/cache/pacman/pkg
pacman -R --assume-installed imath imath
pacman -U opencv-4.5.1-1-x86_64.pkg.tar.zst openexr-2.5.5-1-x86_64.pkg.tar.zst
This task depends upon

Closed by  Antonio Rojas (arojas)
Wednesday, 28 April 2021, 11:23 GMT
Reason for closing:  Not a bug
Comment by Ben (root) - Wednesday, 28 April 2021, 10:25 GMT
  • Field changed: Percent Complete (100% → 0%)
It does not work fine with the lastest versions. My system is fully updated and my colleague's system as well and we both experience the same problem.
Comment by Antonio Rojas (arojas) - Wednesday, 28 April 2021, 10:25 GMT
post the output of 'pacman -Q openexr opencv'
Comment by Ben (root) - Wednesday, 28 April 2021, 11:19 GMT
Right. After the change from opencv 4.5.1 to 4.5.2, the package python-opencv is required. We did not have that package installed and downgraded opencv because of that. After the full upgrade it still complained about the missing module, because python-opencv was missing.

And you were right, the ImportError only shows with partial upgrades. Sorry for that and thanks! Go ahead and close it.

Loading...