Bug:
Some day I updated my OpenCV to the latest version 2.4.13, while recently I found I always get "2.4.8" When I check the VE Rsion in python2.7. It is wired and anoiying. Also it is normal in C + +.
This bug was quite similar with this ONE:OPENCV has different version with Python module. Luckily the answer works. Also refer to Pyimagesearch article-install OpenCV 3.0 and Python 2.7+ on Ubuntu.
Fix:
It's related to the symbolically link problem. I was wasting time reinstalling openCV-2.4.13 for several times.
In all, after installing the new version of OpenCV, one more step is needed. We need to symbolically link our newly created library file-cv2.so-to our Python package path.
Let ' s say
/usr/local/lib/python2.7/site-packages/cv2.so:symbolic link to '/usr/lib/python2.7/dist-packages/cv2.so '
Which is usually the case.
We need to remove the symbolic link with the ' RM ' and create a new one with the This command:
Ln-s ~path to your new cv2.so file ~/usr/local/lib/python2.7/site-packages/cv2.so
Here it shall is
Ln-s/usr/local/lib/python2.7/site-packages/cv2.so ~/usr/local/lib/python2.7/site-packages/cv2.so
Make python2.7 use the right version of OpenCV