QObject::moveToThread: Current thread is not the object`s thread. Cannot move to target thread

报错:Opencv无法显示图像,报错QObject::moveToThread: Current thread is not the object's thread . Cannot move to target thread

解决方案:conda install pyqt,完美解决。

PS:因为这个报错信息比较模糊不够具体,所以无法定位问题的根源在哪。在网上寻找了各种解决方法,基本上都是如下的方法,但是我是在实验室的服务器上,没有sudo权限,没法apt-get,因此下面这种方案并没有亲自尝试,这里贴出来作为参考吧。

sudo pip uninstall opencv-python
sudo apt-get install libopencv-dev python-opencv

你可能感兴趣的:(学习路上的坑,opencv,linux)