How to install OpenCV 2.4.7 for Python , Ubuntu

asked 2018-11-25 21:41:51 -0600

mado gravatar image

updated 2018-11-25 23:34:06 -0600

I am going to use a code shared on GitHub on facial feature extraction. This code has OpenCV 2.4.7 and Python 2.7 dependencies. This code uses cv2.Boost() which is not found in OpenCV 3.4. I tried OpenCV 3.4, but it didn't work. Also, pypi only support OpenCV 3x. I couldn't install OpenCV 2.4.7 by pip install.

When I try following command.

pip install opencv-python==2.4.7

I get the error:

Could not find a version that satisfies the requirement opencv-python==2.4.7 (from versions:,,,,,,,,,,,,,,,,, No matching distribution found for opencv-python==2.4.7

Could you please let me know how I can install OpenCV 2.4.7 for Python? I prefer to install it in a Conda virtual environment.

O.S: Ubuntu 16.

I can use Windows 10 too.

edit retag flag offensive close merge delete


wouldn't it be easier & better to rpair the python script instead ? (e.g. it's

berak gravatar imageberak ( 2018-11-26 00:37:29 -0600 )edit

Thanks. I tried to import But, error message said is not a package. I checked the documentation. It seems that I need to use But, I cannot import cv or any package from cv.

mado gravatar imagemado ( 2018-11-26 01:22:55 -0600 )edit

can we see your code ?

(btw, the 3.4 samples use a line like: import cv2 as cv)

berak gravatar imageberak ( 2018-11-26 01:28:35 -0600 )edit

Code is in GitHub:

cv.Boost() is used in "" , audetect folder.

I installed OpenCv 3.4 and as I explained I couldn't import I didn't change the GitHib code yet.

mado gravatar imagemado ( 2018-11-26 01:46:13 -0600 )edit