Home >Backend Development >Python Tutorial >How to install opencv in python

How to install opencv in python

藏色散人
藏色散人Original
2019-07-04 10:16:1617178browse

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:

How to install opencv in python

Step 2: Directly enter pip install opencv-python, as shown below:

How to install opencv in python

Wait Installation...

How to install opencv in python

#*Emphasis: On the surface of the red line in the picture, pip downloads the OpenCV library from this address.

Download completed.

How to install opencv in python

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.

How to install opencv in python

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn