How to fix the error “QObject::moveToThread:” in opencv in python?

前端 未结 15 2138
栀梦
栀梦 2020-12-10 11:18

I am using opencv2 in python with the code

import cv2
cv2.namedWindow(\"output\", cv2.WINDOW_NORMAL)       
cv2.imshow(\"output\",im)
cv2.resizeWindow(\'outp         


        
15条回答
  •  隐瞒了意图╮
    2020-12-10 12:00

    I know the thread is a bit old but posting for anyone else out there, I faced the same problem and it was because even after running

    pip3 uninstall opencv-python
    

    there was another version of open-cv in my system which I checked by

    pip list
    

    (I'm guessing that pip only removes the first version it finds) So I ran this command again

    pip3 uninstall opencv-python
    

    And now simply installing opencv by

    pip install opencv-python
    

    worked for me.

提交回复
热议问题