Opencv Have Different Version With Python Module
Solution 1:
One more step is needed. You need to symbolically link your newly created library file -cv2.so- to your python package path. Details can be found in the last part of this instruction PyImageSearch article - Install OpenCV 3.0 and Python 2.7+ on Ubuntu
Since you already have OpenCV installed a linked library file already exists and you will need to remove it first. From a Docker Ubuntu 14.04LTS instance here if I run the 'file' command below it shows:
file /usr/local/lib/python2.7/site-packages/cv2.so
/usr/local/lib/python2.7/site-packages/cv2.so: symbolic link to `/usr/lib/python2.7/dist-packages/cv2.so'
So you need to remove that symbolic link with 'rm' and create a new one with this command:
ln -s ~path to your new cv2.so file~ /usr/local/lib/python2.7/site-packages/cv2.so
With that you should be able to fire up python, import cv2, and confirm the new version of OpenCV is enabled. Enjoy the tutorial.
Post a Comment for "Opencv Have Different Version With Python Module"