How to uninstall opencv3.1?
15,633
Things that didn't work.
sudo apt-get purge libopencv-* python-data python-opencv
- Uninstall the 2.4.11 and Installing the OpenCV3.1 from source then Uninstalled.
After I reinstall and uninstalled the 3.1 version I still can import cv2
without any problem, from cv2.__file__
I remove the '/usr/local/lib/python2.7/dist-packages/cv2.so'
file.
Then I installed the 2.4
version from source and apt-get install python-opencv
the cv2.__version__
is OK now.
Related videos on Youtube
Author by
dariush
Updated on September 18, 2022Comments
-
dariush almost 2 years
Long story short, the features in OpenCV3.1 does not work for me. I did uninstall the OpenCV3.1 with
sudo apt-get purge libopencv*
and install the OpenCV2.4.11 with this, but after installing it, Thecv2.__version__
's result is'3.1.0'
!!Question:
How to uninstall the OpenCV3.1 and replace it with the 2.4.11 one?
Editions:
dpkg -l | grep opencv:
ii opencv-data 2.4.8+dfsg1-2ubuntu1 all development data for opencv
whereis opencv
opencv: /usr/share/opencv
locate cv.py:
/home/dariush/ardupilot/modules/mavlink/pymavlink/tools/python_array_test_recv.py /usr/lib/python2.7/dist-packages/cv.py /usr/lib/python2.7/dist-packages/cv.pyc
-
Admin over 7 yearsHow exactly did you install OpenCV3.1 in the first place?
-
dariush over 7 years@ParanoidPanda I don't remember!! If I have to guess it would be
apt-get
. -
Admin over 7 yearsPlease check your command history with
history
. -
Admin over 7 yearsIt would just be good to know which package you selected to install. You've probably got dependencies from it still left or something.
-
steeldriver over 7 yearsWhat version of Ubuntu are you using? Please edit your question to include the outputs of
dpkg -l | grep opencv
andwhereis opencv
andlocate cv.py
(these will help us figure out how you likely installed it). -
dariush over 7 years@steeldriver done.
-
Admin over 7 yearsSo then purging it with
apt-get
won't work because that's not how you installed it, you must have purged something else rather than what you compiled from source. -
dariush over 7 years@ParanoidPanda agreed, then how can I fix this now?
-
steeldriver over 7 yearsFile
/usr/lib/python2.7/dist-packages/cv.py
would normally be provided by the opencv python bindings packagepython-opencv
, however that doesn't appear in yourdpkg
output either so likely was part of your source install. It may be sufficient to installpython-opencv
from the repository (OTOH it might refuse/complain about overwriting files that are outside of the package management system).
-