Home >Backend Development >Python Tutorial >How to install opencv in python
How to install opencv in python?
This article teaches you how to install the OpenCV library in Python under Windows system.
Because of the powerful pip, you only need two steps to install the OpenCV library. The steps are as follows:
Step 1: Win R to open the run, enter cmd to enter the command line window, see Go to the following interface:
Step 2: Directly enter pip install opencv-python, as shown below:
Wait Installation...
#*Emphasis: On the surface of the red line in the picture, pip downloads the OpenCV library from this address.
Download completed.
As you can see from the red line in the picture, the Opencv library has been successfully installed, and the size of this library is 23.1MB.
At this point, you can import cv2 at will.
The above is a test, that is, when you enter the Python IDE and type import cv2, no error is reported, indicating that the OpenCV library is successfully installed.
Related recommendations: "Python Tutorial"
The above is the detailed content of How to install opencv in python. For more information, please follow other related articles on the PHP Chinese website!