How to fix warning "QObject::moveToThread:" for Opencv3 in python3 using Virtual environment?

Question:

I am using opencv-python==3.3.0.10 and python==3.5.2. I have tried to solve above warning with many references available on the same platform but none of is working in my scenario. I was checking below code and i found irritating warning again and again. So i am curious to know why this kind of situations are coming.

import cv2 as cv
import numpy as np

path = 'sample.jpg'
img = cv.imread(path)
cv.imshow("", img)
cv.waitKey(0)

enter image description here

Asked By: Zara

||

Answers:

Here, I found the solution of my issue:

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update

It seems that the Qt which ships with opencv-python somehow conflicts with the system Qt installation. So, when system will be updated and conflicts are removed, it started responding correctly.

Answered By: Zara
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.