How do I switch between versions of OpenCV?

asked 2016-06-24 12:26:59 -0600

kaylee frye gravatar image

I've been running 2.4.1 recently, but yesterday I decided to update to 3.1.0. At the end of the installation a version check would show 3.1.0, but this morning it shows 2.4.1. How do I switch between versions?

edit retag flag offensive close merge delete

Comments

if you got the src via git clone https://github.com/Itseez/opencv , it's just:

git checkout master - to use the 3.1 branch, and

git checkout 2.4 - to use the latest 2.4 branch

(and then, cmake && make && make install)

berak gravatar imageberak ( 2016-06-24 12:46:12 -0600 )edit

how do you retrieve that version information ? can you rule out the possibility, it's picking up a previous built/installed version ?

berak gravatar imageberak ( 2016-06-24 12:47:16 -0600 )edit

I've been using import cv2 then cv2.__version__ . I can't rule out a previous install, I did a pretty haphazard job of deleting the last version. I don't think that's how I got src. I was following [this tutorial] which went through a virtual environment.(http://www.pyimagesearch.com/2015/07/27/installing-opencv-3-0-for-both-python-2-7-and-python-3-on-your-raspberry-pi-2/)

kaylee frye gravatar imagekaylee frye ( 2016-06-24 14:58:50 -0600 )edit