-1

So first of all I'm on windows10, I'm working in tf-gpu environment not base. This may be long but no article/post/question helped me. I was trying to test an object detection module and now the step for the live video. I had an error:

error: OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1268: 
error: (-2:Unspecified error) The function is not implemented. 
Rebuild the library with Windows, GTK+ 2.x or Cocoa support. 
If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvDestroyAllWindows'

same goes for cv2.imshow. After uninstalling using pip, using conda etc.. I went to anaconda navigator to check the packages, they are still there 2 packages installed via pip channel pypi in cmd, so I removed the opencv and opencv contrib and voila, no package.

pip uninstall opencv-python, pip uninstall opencv-contrib-python

So I go to my notebook, apparently I still can import cv2 even though I'm sure I removed it

import cv2
cv2.__version__

'4.5.4-dev'

And I still have the same error above.

edit: I tried this command as well:

pip3 install opencv-python --upgrade --force-reinstall
``
still the same error as above
  • Does this issue: https://stackoverflow.com/questions/9276169/removing-all-installed-opencv-libs solve your problem? – Valentin Goldité Nov 03 '21 at 22:51
  • @ValentinGoldité I actually saw this question but I couldn't do anything said there, since it's not windows etc... but I made sure there is no opencv in my tf-gpu environment but still it exists when importing – Abdelrahman Rabah Nov 03 '21 at 22:58

1 Answers1

0

I made sure that I removed every package and searched my tf-gpu environment if there is anything existed and shut down my pc, I opened it today and had no module named cv2.

  • Please provide how exactly did you remove your library. – s3nh Nov 04 '21 at 10:37
  • @s3nh with installing and reinstalling several time using conda, using pip I even went through the environment packages to delete it. pip uninstall But make sure to only install opencv-python or opencv-contrib-python only one of them. – Abdelrahman Rabah Nov 04 '21 at 11:20