I am using opencv2 in python with the code
import cv2
cv2.namedWindow(\"output\", cv2.WINDOW_NORMAL)
cv2.imshow(\"output\",im)
cv2.resizeWindow(\'outp
I solved this issue and I posted my solution in related issue on OpenCV github page. But for your convenience, I will post it here also.
In my case, I did almost all the solutions:
kdelibs5-plugins which was an important module for most of my desktop environments, so I give up on uninstalling it.Finally, I found a solution for my case
pip uninstall opencv-python on all instances of my python and virtual environmentspip3 uninstall opencv-python on all instances of my python and virtual environmentssudo apt remove python-opencvthen I downloaded the most recent opencv, in my case opencv-4.1.1 , I build it.
for building :
mkdir build; cd build; ccmake ..
then I pressed pressed c, again pressed c, then pressed g to generate make files, then
sudo make -j8
after successful building, I copied build\lib\python3\cv2.cpython.xxxxxx.so to usr/local/lib/python3.5/dist-packages/ and renamed it to cv2.so
Do the same for each virtualenv that you have. ( I'm not sure if it is logical, but it worked for me).
then everything worked fine without any error.