Learning from masters
Learning from masters

Reputation: 2792

Remove old opencv and install new one from build

I built the last opencv version and I included the option to have a python version. I can find the file .so for python inside the build folder, but I don't know where to copy it. After long time trying it, I thought there could be some conflict with older versions, so I thought in doing a sudo apt-get remove python3-opencv. I also tried from pip3, but if I enter into python3, I can do an import cv2. That's why, I thought in doing a sudo apt-get remove python3. I'll never do it again. After reinstalling what I unninstalled from terminal, I got ubuntu back again. But still, I can detect opencv from python3. Does anyone have a good guide how to proceed?

Upvotes: 0

Views: 1919

Answers (1)

Stephen Meschke
Stephen Meschke

Reputation: 2940

Use pip3 uninstall opencv-python to remove the old version, and then use pip3 install opencv-python or pip3 install opencv-contrib-python.

When your are finished run this code to see the current verion:

import cv2
print(cv2.__version__)

Upvotes: 2

Related Questions