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?
If not, how can I specify which version to install?
Thanks.
Start the Python shell by typing python3 and then hit enter. You will be inside the Python shell where you can execute your Python code. Import the cv2 package which is the name of the OpenCV module. Type “import cv2” and hit enter.
OpenCV can be installed using pip. The following command is run in the command prompt to install OpenCV. This command will start downloading and installing packages related to the OpenCV library. Once done, the message of successful installation will be displayed.
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With