Source: Internet
Author: User
Tags win32

1. Install Python 3.4 for Windows

Well, there seems to be nothing to say.

2. Download OpenCV 3 and NumPy (OpenCV dependent numpy library)

There is something wrong with everyone here. If using the PIP install directly with the PYOPENCV installation will be an error. Here we use the Python Live Lei Feng Package installation package, everyone according to their own system download:

    • OpenCV 3:
    • numpy:
3. Installation of OpenCV and NumPy

Put the downloaded WHL file into a convenient directory, open cmd, install (I installed the 32-bit PYTHON,WHL package on the C-drive):

pip install c:\opencv_python-3.0.0-cp34-none-win32.whlpip install c:\numpy-1.9.3+mkl-cp34-none-win32.whl

After minutes of installation, this feeling of leverage.

After the installation is done, of course, a code test:

from cv2 import *# 加载摄像头cam = VideoCapture(0)   # 0 -> 摄像头序号,如果有两个三个四个摄像头,要调用哪一个数字往上加嘛# 抓拍十张小图片for x in range(0,9):    s, img =    if s:        imwrite("o-"+str(x)+".jpg",img)

Running, lying in the groove, so took 10 small photos, files stored in the script in the same directory. There is no very touched, hurriedly with OpenCV hey Hey hehe go.


About the resolution of the error:

C:\python27\scripts>pip Install "NUMPY-1.9.2+MKL-CP26-NONE-WIN_AMD64.WHL" Numpy-1.9.2+mkl-cp26-none-win_ AMD64.WHL is a supported wheel on this platform.

Reason: Python version does not correspond to version of NumPy



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.