Skip to main content

Wrapper package for OpenCV python bindings.

Reason this release was yanked:

Release deprecated

Project description

Unofficial OpenCV packages for Python with contrib modules.

Note: the usage of opencv-contrib-python might be restricted in some countries since the contrib package contains some patented algorithms/non-free modules.

If you are looking for a version without the contrib modules, please install opencv-python instead.

The packages contain pre-compiled OpenCV binary with Python bindings. This enables super fast (usually < 10 seconds) OpenCV installation for Python.

If you need only OpenCV Python bindings, no separate OpenCV installation is required.

IMPORTANT NOTE

MacOS and Linux wheels do not support video related functionality (not compiled with FFmpeg).

Installation and Usage

  1. If you have previous/other version of OpenCV installed (e.g. cv2 module in the root of Python’s site-packages), remove it before installation to avoid conflicts.

  • To further avoid conflicts and to make development easier, Python’s virtual environments are highly recommended for development purposes.

  1. If you have an existing opencv-python installation, run pip uninstall opencv-python

  2. Install this package:

pip install opencv-contrib-python

  1. Import the package:

import cv2

  1. Read OpenCV documentation

  2. Before opening a new issue, read the FAQ below and have a look at the other issues which are already open.

Frequently Asked Questions

Q: Do I need to install also OpenCV separately?

A: No, the packages are special wheel binary packages and they already contain statically built OpenCV binaries.

Q: Pip does not find package opencv-contrib-python?

A: The wheel package format and manylinux builds are pretty new things. Most likely the issue is related to too old pip and can be fixed by running pip install --upgrade pip and pip install wheel.

Q: Import fails on Windows to some DLL load error?

A: If the import fails on Windows, make sure you have Visual C++ redistributable 2015 installed. If you are using older Windows version than Windows 10 and latest system updates are not installed, Universal C Runtime might be also required.

See also this issue if you are using Anaconda.

Q: I have some other import errors?

A: Make sure you have removed old manual installations of OpenCV Python bindings (cv2.so or cv2.pyd in site-packages).

Q: Why I can’t open video files on GNU/Linux distribution X or on macOS?

A: OpenCV video I/O depends heavily on FFmpeg. Manylinux and macOS OpenCV binaries provided withing these packages are not compiled against it. The purpose of these packages is to provide as easy as possible installation experience for OpenCV Python bindings and they should work directly out-of-the-box. Adding FFmpeg as an additional dependency without a “universal” FFmpeg build (e.g. LGPL licensed build like in the Windows wheels) the goal is considerably harder to achieve. This might change in the future.

Documentation for opencv-python

AppVeyor CI test status (Windows) Travis CI test status (Linux and OS X)

The aim of this repository is to provide means to package each new OpenCV release for the most used Python versions and platforms.

At the same time it allows anyone to build a custom version of OpenCV for any Python version: just fork this repo and modify the build files and scripts to fit your needs.

Build process

The project is structured like a normal Python package with a standard setup.py file. The build process for a single entry in the build matrices is as follows (see for example appveyor.yml file):

  1. Checkout repository and submodules

    • OpenCV is included as submodule and the version is updated manually by maintainers when a new OpenCV release has been made

    • Contrib modules are also included as a submodule

  2. Find OpenCV version from the sources

  3. Install dependencies (numpy)

  4. Build OpenCV

    • tests are disabled, otherwise build time increases too much

    • there are 2 build matrix entries for each build combination: with and without contrib modules

    • Linux builds run in manylinux Docker containers (CentOS 5)

  5. Copy each .pyd/.so file to cv2 folder of this project and generate wheel

    • Linux and macOS wheels are checked with auditwheel and delocate

  6. Install the generated wheel

  7. Test that python can import the library and run some sanity checks

  8. Use twine to upload the generated wheel to PyPI (only in release builds)

Currently the find_version.py file parses OpenCV version information from the OpenCV sources. OpenCV depends on numpy, so setup.py checks the minimum required numpy version also with the help of pip.

The cv2.pyd/.so file is normally copied to site-packages. To avoid polluting the root folder this package wraps the statically built binary into cv2 package and __init__.py file in the package handles the import logic correctly.

Since both opencv-python and opencv-python-contrib use the same namespace explained above, it is highly recommended to uninstall the other package before switching from example from opencv-python to opencv-python-contrib package.

Licensing

Opencv-python package (scripts in this repository) is available under MIT license.

OpenCV itself is available under 3-clause BSD License (LICENSE-3RD-PARTY.txt).

Windows wheels ship with FFmpeg licensed under the LGPLv2.1.

Linux and MacOS wheels ship with Qt 4.8.7 licensed under the LGPLv2.1.

Versioning

Currently the find_version.py script searches for the version information from OpenCV sources and appends also a revision number specific to this repository to the version string.

Releases

A release is made and uploaded to PyPI when a new tag is pushed to master branch. These tags differentiate packages (this repo might have modifications but OpenCV version stays same) and should be incremented sequentially. In practice, release version numbers look like this:

cv_major.cv_minor.cv_revision.package_revision e.g. 3.1.0.0

Development builds

Every commit to the master branch of this repo will be built. Possible build artifacts use local version identifiers:

cv_major.cv_minor.cv_revision+git_hash_of_this_repo e.g. 3.1.0+14a8d39

These artifacts can’t be and will not be uploaded to PyPI.

Manylinux wheels

Linux wheels are built using manylinux. These wheels should work out of the box for most of the distros (which use GNU C standard library) out there since they are built against an old version of glibc.

Supported Python versions

Python 2.7 is the only supported version in 2.x series. Python 3.x releases follow Numpy releases, for example Python 3.3 is no longer supported by Numpy so the support for it has been dropped in opencv-python too.

Currently, builds for following Python versions are provided:

  • 2.7

  • 3.4

  • 3.5

  • 3.6

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

opencv_contrib_python-3.3.0.10-cp36-cp36m-win_amd64.whl (45.5 MB view details)

Uploaded CPython 3.6m Windows x86-64

opencv_contrib_python-3.3.0.10-cp36-cp36m-win32.whl (34.9 MB view details)

Uploaded CPython 3.6m Windows x86

opencv_contrib_python-3.3.0.10-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (49.5 MB view details)

Uploaded CPython 3.6m macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64

opencv_contrib_python-3.3.0.10-cp35-cp35m-win_amd64.whl (45.5 MB view details)

Uploaded CPython 3.5m Windows x86-64

opencv_contrib_python-3.3.0.10-cp35-cp35m-win32.whl (34.9 MB view details)

Uploaded CPython 3.5m Windows x86

opencv_contrib_python-3.3.0.10-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (49.5 MB view details)

Uploaded CPython 3.5m macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64

opencv_contrib_python-3.3.0.10-cp34-cp34m-win_amd64.whl (45.5 MB view details)

Uploaded CPython 3.4m Windows x86-64

opencv_contrib_python-3.3.0.10-cp34-cp34m-win32.whl (34.9 MB view details)

Uploaded CPython 3.4m Windows x86

opencv_contrib_python-3.3.0.10-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (49.5 MB view details)

Uploaded CPython 3.4m macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64

opencv_contrib_python-3.3.0.10-cp27-cp27m-win_amd64.whl (45.5 MB view details)

Uploaded CPython 2.7m Windows x86-64

opencv_contrib_python-3.3.0.10-cp27-cp27m-win32.whl (34.9 MB view details)

Uploaded CPython 2.7m Windows x86

opencv_contrib_python-3.3.0.10-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (49.5 MB view details)

Uploaded CPython 2.7m macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64

File details

Details for the file opencv_contrib_python-3.3.0.10-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e84d0b49d1e6cc349af0d12524d6d34ff1c7ee68c8767880285659b00e1b8884
MD5 aae85b36a74284211b135d112077d87a
BLAKE2b-256 b20659827329dca7aaa37663e6f2117b48f96e4188f471ab7a189dfa8914cf6a

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 7dc2861a6eb41b1b97b65b2d2a1bdae6f1b33991604bb1ce279c98c59655512d
MD5 f14e3fae086b9976bdc491f96b4785d3
BLAKE2b-256 a998d372ff7120e32c27fea9094964a4feb8aa975f60fc02dcd2ca5b169710b7

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c758d8a0ae3132958aa534a8929c4e8bc3412f622e63ad63a0d0847244437a6e
MD5 ea1e18e15a42b88c1fad1a87da3173d7
BLAKE2b-256 6a8c2ceec0162a5978592e9ca9a47976d61de3c28c55d2710045ded9c2333b78

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp36-cp36m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 bcecef79a62ea1addb02c6ed1ff2d382d09698e6f56c68f5bc8fb0e8ee7c7c52
MD5 94e33e66873e5adfd462282271f44d83
BLAKE2b-256 6c6b9affd00079e93e20beb30235cfed2a0f86accf26940d12d299ff89e47f6c

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 b4483c72ec1d1ce857566291701da0f1373b26fc63a961c78bdf8ddf6a39c642
MD5 d26c13be8936955fc96f440639d182fd
BLAKE2b-256 8308c2ba96ea8b758e6c64866375648e3bd15d1a2a76894aee3fae3bc3746188

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 78493c36a8df6819bff753eb4cce04b38cf95a1f7045822a4e7246d3171c0509
MD5 97a2a89162d430d3d4ec8023a422f803
BLAKE2b-256 fa470fed55f27b160ce766076847b7f8501edcc912e5c82cae62bc35f153e640

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 5d1b26370d8e0fbfba93b6b3c800d31e406e53399ebd301da7cef6cea89740b2
MD5 57eed271c1bafc6dbb8892928357fb70
BLAKE2b-256 a9ad02aa6f78520a06afad8791e751a344bc63c21e50e28f4e3b723835222482

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 88b8b5a599379641747f9d27ddd195765ef727b34f2d198800b5fe659e02b687
MD5 209852c5df151e856aa9d53caf0051a4
BLAKE2b-256 e8791b51e9678f446bed632634973255987deb669154399192a8475bb2e47159

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ef2197eb5e6dd86a3ee2e0d9ff4a89357bd2eee5640e03e3aa1821c95d03d684
MD5 93bf3eee5cc50a89c0cb1d5488b5da53
BLAKE2b-256 61b1a0e795122aed72b448c0e3cc838ffad295dc594c70f8789950e35b4d8731

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 106875530e74624083b63a5af11b6bc708d90470bedc5a36309762d9d28d20d6
MD5 5a9acd3fb842f2a693112e28cce4345c
BLAKE2b-256 7f2b903999b64c1102d06287c2bcb24f5ca1ea2e5a04cb4c713f183ae2c79ea3

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 b1d01bc3e2e57b8073c3f8ec1133b8887a81ea5c95eb62477b5982d866aee52a
MD5 c66eeb004aa18b9d701c9aaa85f827db
BLAKE2b-256 1662faa38a6ef62ec09369b8a4adda717cdc242436d3d7a7cfa92d45acde6c62

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 47e01c01acb1adf03cb0959aca30dd7ca175e37ad02cbec31eb0fb6cccd3ff83
MD5 ded273ec68a3ec7810f6140569e4dfed
BLAKE2b-256 269fbfba8c2fa658bee97b2daaf4b01fa3dfa8307c67bd5374cc907d85367879

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f015ddb3b881b614be2853093e12e55391f4a7a48d320442d51639c73c7aeaf5
MD5 43b3dec6fc4da39282c2a4b4582fb724
BLAKE2b-256 20ca4e8d6cb70c1ffb0b7bf8aa1656950ff70a8beb3a14409448fecb59d233a1

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp34-cp34m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 9fc5b93b9b4da8775d15c82279c16ef126e38fb38018f0719cfec7758676c70c
MD5 d77e4223fd61528de8e733058ac52e46
BLAKE2b-256 87eb518323ac4efa0817c7c6e1a2fb24e9d49edc23e93ec26fe5d3ebde810fe8

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 c087a50c688df11f13e201e47c54fce6fc7d752158688e536b114946ef0a77ec
MD5 340c144733f613bcab72504002524b6b
BLAKE2b-256 961b132942ae559564af255731e4a5acaaa6518e23b7563b6fad91bd96b59be9

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 93097af514be8624ed3ab352ef27293083e0e886a13d8bac5636ca12d0688258
MD5 73341f41e7ac6b3163af8e2031a5ba5e
BLAKE2b-256 41c04e6c54dff0c4ad46de20603271b4c04e07be6119648df72c7ee2894bc3ca

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp27-cp27mu-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 422d73eb3dbb0cd839bdb3c22faf3e5cf7fbf9805134aa99e748081b910915d1
MD5 f9387c61b691edb6fcfa1d2753fc6c84
BLAKE2b-256 95758333b569b4c05327b0c993c4f0b5b3c4a6de64b740e076987826375a8d35

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 4b212ae80ffc5205b3eab9cdbf030abe88fa38c06f9b660d861eaf96279c15ed
MD5 a3b890ce2878ec8d30e602544902220a
BLAKE2b-256 c1c65ece35b39fe38f550077a2879121c581c0bf2aa76eac9ee7abc3aa742b9e

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 284f4319f520cb537102e76a07119716c5ac100475870d95e9b769a1ba59e826
MD5 f3955b9ad6467ef5578f344a8fc52c66
BLAKE2b-256 ddf640dd01bd63931b36384fb528f265f89aea3a8fc36dfc71f35f334aa2b8ea

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 23c5ea633a8a98cc2fc3e56975ca68ba888c26e5190b8fc90132b09697c3ab3d
MD5 318ae50db20b08450c4285314ff63eef
BLAKE2b-256 f781482d0525535709aac6ed06077690bc604e5db874c42f34b04dd3d601ef59

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp27-cp27m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7c2186a67fea00d046eead9c02ccb7a520f85906103165e36b27e072d14a1387
MD5 e582f0f5be4227ae4293e5e51704b628
BLAKE2b-256 983fd44a0500e59907c117438a32a2fc2a634c1fd9f12a4e15c816b474e26c0f

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.3.0.10-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.3.0.10-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 11b2af3c59e13e0d713fb8cf9154dcc59fbe07965d6f67f051469d2bf612cb54
MD5 98d36bf7c923c74d2c89e63b9c03f29d
BLAKE2b-256 85602df33eaed9e1ea325349480063de5c49d238f95d983038ca3480429a90ea

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page