PyQt and OpenCV interfering

230 Views Asked by At

I try to make a PyQT application but when I try to make a desktop app out of it I get this error message:

ImportError: dlopen(/Users/seansdahl/SpaceNewsApp/target/SpaceNews.app/Contents/MacOS/cv2/cv2.cpython-37m-darwin.so, 2): Symbol not found: __ZN10QByteArray11shared_nullE
  Referenced from: /Users/seansdahl/SpaceNewsApp/target/SpaceNews.app/Contents/MacOS/cv2/../QtTest
  Expected in: /Users/seansdahl/SpaceNewsApp/target/SpaceNews.app/Contents/MacOS/PyQt5/../QtCore

I use the following two imports:

import cv2
import qtpy

but I have the PyQt5 module installed as well. It seems like these two modules are interfering somehow. (The app works as long as I don't import opencv).

What am I missing?

1

There are 1 best solutions below

1
On

installed pyqt and qtpy may lead to qt confusion. maybe u can remove them and re-install