Three ways to install OpenCV 3.x, working from Python 2.7 through Python 3.6:
1. (Linux, Mac, Windows) OpenCV 3.x conda install
Assuming you use Anaconda/Miniconda Python:
conda install -c menpo opencv3
2. (Windows only) OpenCV 3.x pip install
- Download .whl file (cpMN where you have Python M.N).
contribincludes OpenCV-extra packages. For example, assuming you have Python 3.6, you might download
from Command Prompt:
pip install opencv_python-3*win_amd64.whl
3. (Linux, Mac, Windows) compile OpenCV 3.x from source
You can manually compile and install OpenCV for Python 2.7 to Python 3.6.
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.