Home  >  Article  >  Backend Development  >  How to install python cv2 module

How to install python cv2 module

青灯夜游
青灯夜游Original
2021-03-02 15:55:1380303browse

Installation method: 1. Configure the python environment; 2. Open the cmd command window and execute the "python" command to check whether the environment is configured properly; 3. If the configuration is successful, execute the "exit()" command to exit the environment; 4. Execute the "pip install opencv-python" command to install the cv2 module.

How to install python cv2 module

The operating environment of this tutorial: windows10 system, python3 version, DELL G3 computer

python installation cv2 module

1. First configure the python environment

Open the "Control Panel" and click "Advanced System Settings"-"Environment Variables"

How to install python cv2 module

In the system variables, double-click "Path"

How to install python cv2 module

At the end of the string, add a semicolon;

Then enter your installation python path, click "OK" until the setting is completed.

Open the cmd command line, enter python, and check whether the environment is configured properly. If the following prompt appears, the configuration is successful.

How to install python cv2 module

Exit the environment exit()

How to install python cv2 module

2. Enter pip install opencv-python and click Enter to install

How to install python cv2 module

After the installation is completed, it will prompt that the installation was successful

How to install python cv2 module

##Related recommendations:

Python3 video tutorial

The above is the detailed content of How to install python cv2 module. 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