I know that I could pip install opencv-python
which installs opencv3, but is there a separate command or name for opencv specific version such as 2.4.9?
The following command line pip install opencv-python==3.4.2.16
works properly. Use one of the versions presented to you. May be:
3.1.0.5, 3.2.0.6, 3.2.0.7, 3.2.0.8, 3.3.0.9, 3.3.0.10, 3.3.1.11, or 3.4.0.12, etc.
To make sure, you can see my screenshot.screenshot
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==
If you're a Windows user, opencv can be installed using pip, like this:
pip install opencv-python==<python version>
ex - pip install opencv-python==3.6
If you're a Linux user:
sudo apt-get install python-opencv
At the same time, opencv can be installed using conda like this...
conda install -c https://conda.binstar.org/menpo opencv=3.6
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!
First, get the correct opencv version extension which you want to install. If you want to install 3.4.9.20 then run pip install opencv-python==3.4.5.20
.
python -m pip install opencv-python
which will install opencv based on your current python