python -m pip install opencv-python
For those desired the latest extended functionality that hasn’t yet been incorporated into the core package, OpenCV including the Extra contributed modules may be obtained by:
python -m pip install opencv-contrib-python
Issues with OpenCV 3.4.2 and MacOS Xcode delayed release of OpenCV 3.4.2 Python wheels. Linux and Windows wheels are fine.
- OpenCV 3 release notes
- Conda-forge OpenCV 3
- (reference) Windows-only OpenCV wheels.
(cpMN where you have Python M.N).
contribincludes OpenCV-extra packages. For example, assuming you have Python 3.7, you might download
Python executable selection
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\python -m pip install opencv-python
Test Python OpenCV install
We made several test scripts to try out the OpenCV install.
You can compile and install OpenCV for Python. Or compile OpenCV with extra contributed packages. Compiling yourself allows customizing and optimizing OpenCV for your computer (e.g. using GPU, TBB, OpenCL, etc.).
conda install opencv and
conda install -c conda-forge opencv methods for OpenCV continue to be BROKEN for video/image reading and display.
pip install above instead.