Python: How to pip install opencv2 with specific version 2.4.9?

There's another easy way, you can type in terminal

sudo apt-get install python-opencv

Install OpenCV-Python in Ubuntu

After installing it, you can use opencv version 2.4 in both c++ and python.

But I recommend you should use opencv 3.2.0 and opencv-contrib, it gives more features

Hope this can help!


Via pip you can specify the package version to install using the following:

pip install opencv-python==2.4.9

However, that package does not seem to be available on pypi.

A little trick for checking available versions:

pip install opencv-python==

Which returns:

Could not find a version that satisfies the requirement opencv-python== (from versions: 3.1.0.0, 3.1.0.1, 3.1.0.2, 3.1 .0.3, 3.1.0.5, 3.2.0.6, 3.2.0.7) No matching distribution found for opencv-python==


Easy and simple

  • Prerequisites
    • pip install matplotlib
    • pip install numpy
  • Final step
    • pip install opencv-python

Specific version * Final step * opencv-python==2.4.9