Closed ayennam closed 3 years ago
Hi @ayennam ,
Please, reopen this issue and be more specific.
What platform are you using? Have you installed all the prerequisites?
Hi @rafaelpadilla
I cloned the repo, installed all the packages (I didn't use conda).
I installed python3-pyqt5.
Then i run python3 setup.py install
and then python3 run.py
And I got this error:
QObject::moveToThread: Current thread (0x14872f0) is not the object's thread (0x1e47730).
Cannot move to target thread (0x14872f0)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/hani/.virtualenvs/tests/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
Aborted (core dumped)
I am using Ubuntu 20.04 And these are the packages I installed:
cycler==0.10.0
kiwisolver==1.3.1
matplotlib==3.3.4
numpy==1.19.5
opencv-python==4.5.1.48
pandas==1.1.5
Pillow==8.3.2
pyparsing==2.4.7
PyQt5==5.15.4
PyQt5-Qt5==5.15.2
PyQt5-sip==12.9.0
python-dateutil==2.8.2
pytz==2021.1
six==1.16.0
src==0.1.0
I tried with python 3.6 and python 3.8 but I still get the same error
opencv-python conflicts with PyQt5. Workaround:
diff --git a/run.py b/run.py
index 3e2c2ac..5c11f7f 100644
--- a/run.py
+++ b/run.py
@@ -4,6 +4,7 @@
import sys
from PyQt5 import QtWidgets
+QtWidgets.QApplication(sys.argv) # make sure PyQt5's plugins loaded before opencv-python's Qt5 plugins
from src.ui.run_ui import Main_Dialog
from src.ui.splash import Splash_Dialog
Installing opencv headless opencv-python-headless==4.5.3.56
instead of opencv solved the problem for me.
i'am installing opencv-python-headless==4.5.3.56 yeah work. thanks
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
Aborted (core dumped)