You are not logged in.

#1 2025-10-10 08:13:28

pelegs
Member
Registered: 2020-10-18
Posts: 31

[SOLVED] python-opencv error: undefined symbol

Full python error:

ImportError: /usr/lib/libopencv_highgui.so.412: undefined symbol: _ZN9QtPrivate17expectedAllocSizeEmm, version Qt_6

I got this when I tried to import cv2 into python (3.11 in my case) after installing the python-opencv package (version 4.12.0-10).

I uninstalled the package, and installed python-opencv via pip:

pip install opencv-python --break-system-packages

And now it works ok.

I'm not sure if I should make a full bug report or not, to me it seems that the issue is with the upstream, not the packaging. But I'm far from experienced in this.

Offline

#2 2025-10-10 08:33:18

mithrial
Member
Registered: 2017-03-05
Posts: 112

Re: [SOLVED] python-opencv error: undefined symbol

I don't think the intended use of python-opencv is with Python 3.11. If you really want 3.11, use a virtualenv for your project.

Offline

#3 2025-10-10 10:12:23

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,239

Re: [SOLVED] python-opencv error: undefined symbol

pelegs wrote:

I'm not sure if I should make a full bug report or not, to me it seems that the issue is with the upstream, not the packaging. But I'm far from experienced in this.

Yes, this is a packaging issue. opencv was compiled with Qt 6.10 in testing and moved to extra ahead of time.

Offline

Board footer

Powered by FluxBB