vscode+python+opencv installation configuration

I have been learning machine vision these days, and after a long time of learning online, I searched for it for a long time, and finally found it. First look at the renderings

In the end, this interface should appear in this screen without reporting an error. The specific operation is as follows:

First install python

When installing, you must automatically add the path here (add python.exe to path). Note that your computer should only have one python, or you need to add the specified python path in vscode. The specific process can be seen in the video tutorial [Issue 7] How to use Visual Studio Code + Python + OpenCV to turn on the USB camera_哔哩哔哩_bilibili

 If there is only one python, there is no need to add the path in vscode

After the download is complete, download vscode, open vscode, and first download the Chinese package (the specific process is to click the four square icons on the far left first, and then find the Chinese (simplified) one, after downloading, it will become a Chinese version After that, download python (python extension for visual stdio code this one))

 Then search for cmd on the computer

Then download opencv-python inside contrib-(this is actually downloading opencv)

Enter pip install opencv-contrib-python-i https://pypi.tuna.tsinghua.edu.cn/simple and click Enter. This is for reference to the contributors below, thank you very much

(7 messages) OpenCV-python installation tutorial_curiousNinen's Blog-CSDN Blog

Then enter import cv2

Check to see if an error is reported. If there is no problem, it's fine. Goodbye.

Guess you like

Origin blog.csdn.net/weixin_48433993/article/details/130790687