Install OpenCV in Python
The unofficial OpenCV PyPI
wheels
work with pip install
methods:
pip install opencv-python
For ARM / Raspberry Pi:
pip install opencv-python
also works for certain ARM platforms like the Raspberry Pi.
OpenCV is trivial and fast to install on a Raspberry Pi via pip
as described above.
For the latest extended functionality that hasn’t yet been incorporated into the core package, OpenCV including the Extra contributed modules may be obtained by:
pip install opencv-contrib-python
- OpenCV release notes
- Conda-forge OpenCV 3
- (reference) Windows-only OpenCV wheels.
(cpMN where you have Python M.N).
contrib
includes OpenCV-extra packages.
If ... is not supported on this platform
error be sure it’s using desired Python install.
One may have to manually specify the path for the pip
command e.g.
$Env:SystemDrive\anaconda3\scripts\python -m pip install opencv-python
We made several test scripts to try out the OpenCV install. Compiling OpenCV yourself allows customizing and optimizing OpenCV for your computer (e.g. using GPU, TBB, OpenCL, etc.).
The conda install opencv
and conda install -c conda-forge opencv
methods for OpenCV continue to be BROKEN for video/image reading and display.
Use pip install
above instead.