转载自: https://www.scivision.co/install-opencv-python-windows/
whl 安装文件下载链接: http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
Here are three ways to install OpenCV 3.2.0. OpenCV 3.2 works with Python 2.7, 3.4, 3.5 and 3.6:
1. (Linux, Mac, Windows) OpenCV 3.2 conda install
Assuming you use Anaconda/Miniconda Python:
conda install -c menpo opencv3
2. (Windows only) OpenCV 3.2 pip install
Download .whl file (cpMN where you have Python M.N). contrib includes OpenCV-extra packages. For example, assuming you have Python 3.6, you might download opencv_python-3.2.0+contrib-cp36-none-win_amd64.whl
from Command Prompt:
pip install opencv_python-3*win_amd64.whl
3. (Linux, Mac, Windows) compile OpenCV 3.2 from source
You can manually compile and install OpenCV for Python 2.7 to Python 3.6. This method allows you to customize and optimize OpenCV for your PC (e.g. using GPU, TBB, OpenCL, etc.).
OpenCV Install Notes
If you get the ... is not supported on this platform error be sure you’re not accidentally using Python 2.7 instead of Python 3, you may have to manually specify the path for the pip command e.g.
c:\anaconda3\scripts\pip install opencv_python-3*.whl
Testing the Python OpenCV install
You can get some test scripts if you want to tryout your OpenCV install.