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

最近在使用 conda 环境踩了个坑,运行 opencv 项目时弹出满屏的 Qthread 报错。
网上的解决方法大多是把 opencv-python 降级,或者 sudo 用包管理器安装到系统,但是都没有很彻底或者说优雅地解决问题。
问题描述
python 3.8 (conda) 环境下,运行 opencv 项目出现报错:QObject::moveToThread: Current thread(…) is not the object`s thread. Cannot move to target thread(…)。
问题溯源
以上报错是由于使用 conda 安装 pyqt ,用 pip 安装 opencv ,由版本冲突导致的:

如果您使用 Anaconda 虚拟环境并同时执行 conda install pyqt 和 pip install opencv-python。 opencv-p

QObject::moveToThread: Current thread(…) is not the object`s thread. Cannot move to target thread(最先出现在Python成神之路

版权声明:
作者:Mr李
链接:https://www.techfm.club/p/16525.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>