Skip to main content

Wrapper package for OpenCV python bindings.

Reason this release was yanked:

Release deprecated

Project description

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

OpenCV on Wheels

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 have currently some limitations:

  • video related functionality is not supported (not compiled with FFmpeg)

  • for example cv2.imshow() will not work (not compiled with GTK+ 2.x or Carbon support)

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.

Q: Why I can’t open GUI windows (``cv2.imshow()``) on GNU/Linux distribution X or on macOS?

A: Like above, OpenCV was not compiled against GTK or Carbon. Support for these might be added in the future.

Documentation for opencv-python

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 the __init__.py file in cv2 folder handles the import logic correctly by importing the actual .pyd./.so module and replacing the imported cv2 package in sys.modudes with the cv2 module to retain backward compatibility.

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.

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.2.0.7-cp36-cp36m-win_amd64.whl (28.4 MB view details)

Uploaded CPython 3.6mWindows x86-64

opencv_contrib_python-3.2.0.7-cp36-cp36m-win32.whl (24.4 MB view details)

Uploaded CPython 3.6mWindows x86

opencv_contrib_python-3.2.0.7-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 (41.9 MB view details)

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

opencv_contrib_python-3.2.0.7-cp35-cp35m-win_amd64.whl (28.4 MB view details)

Uploaded CPython 3.5mWindows x86-64

opencv_contrib_python-3.2.0.7-cp35-cp35m-win32.whl (24.4 MB view details)

Uploaded CPython 3.5mWindows x86

opencv_contrib_python-3.2.0.7-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 (41.9 MB view details)

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

opencv_contrib_python-3.2.0.7-cp34-cp34m-win_amd64.whl (28.4 MB view details)

Uploaded CPython 3.4mWindows x86-64

opencv_contrib_python-3.2.0.7-cp34-cp34m-win32.whl (24.4 MB view details)

Uploaded CPython 3.4mWindows x86

opencv_contrib_python-3.2.0.7-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 (41.9 MB view details)

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

opencv_contrib_python-3.2.0.7-cp27-cp27m-win_amd64.whl (28.4 MB view details)

Uploaded CPython 2.7mWindows x86-64

opencv_contrib_python-3.2.0.7-cp27-cp27m-win32.whl (24.4 MB view details)

Uploaded CPython 2.7mWindows x86

opencv_contrib_python-3.2.0.7-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 (41.9 MB view details)

Uploaded CPython 2.7mmacOS 10.10+ Intel (x86-64, i386)macOS 10.10+ x86-64macOS 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.2.0.7-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 49b52ad3a05a2a33f6fe4b56dc1fbde7805445d839728fdab69b93667b3198db
MD5 06d4fc65f5c0d56605bcdfbaafe0439c
BLAKE2b-256 247f8c105e41aa31cc3d8dca494ac6d2bfe2187ba52dfbc7c90763cf0ebc4d4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 c20e40098d4810aeb66435afea1a752d8ff0ef38676acd1a3d659c08f9603198
MD5 b97ca538e4d7488fdd39e94622842102
BLAKE2b-256 e51d11ac719671716f23e90518e0074c5eb801b936b499147d91acc8b6960bf9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e09b27b7a3d9602cd17351223430fdae83850c1943407a4bbaebc0a442d331c1
MD5 4294f149d34f62edae2f228022ae642c
BLAKE2b-256 4ab2f45463914104bcff06d203062cf6d23bcbe5a31dfdc2bb63bff93062b207

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 fa5d43f2842a47bc5fe7280e0e228d5307f454fa94bc1226574e4bf97fc3dbc8
MD5 ecad77be1714b045baae2a301e99f943
BLAKE2b-256 009c38711b1e738e595c4a18a15e6f90d88082a4ac0c2fc2d4d9488ebfac4e59

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.2.0.7-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.2.0.7-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 9a4784863eedf8f2a9c2bf6d82b8257c1b95ffa3c8ab3824516ea5c9791262b0
MD5 4da48a40fa215bbc9e7e75bf83b61102
BLAKE2b-256 2d2b79c3415a9ec0d072c88b105cee90d5201384e4c7b567aac4aaaa91db3fa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 cf60c3b4b2f895eb4c152e0d0b067dbbc7c22aa63e9e730ea6d5f96c5730da42
MD5 d7ef3e137110cbf1429b9986e182d9c0
BLAKE2b-256 aa3b76a201a66a76dcab5f847fd5395d4473e5e82f7ffa522a23e475130496ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 6927ccfcc5c2754c89ad75fc7bdf3aefd417dd19d7f45fae0b26ac348face6b4
MD5 5d1eac011995a77bcccacbd0176ed029
BLAKE2b-256 0f30c47f4ebe48b385f0c63bf1b30e2f1934f8542f72664ed4f40cbf6861e568

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1be97ab59cb73f41a3193703ce700f21dd0c6f9b174e4c88ff0e2ff98c99a82c
MD5 b39055cb4684b74105b0917dad215169
BLAKE2b-256 58a203961bc34a2fc39f88423ee2d613ea1c1fdc6530773b37db0f8db311866d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 4784c62d7673b46c9e25e3457318cff8c4d2334304fb910d72f6be83bc507b5a
MD5 7a10c421d703b0e5b1d3e35bfe437fdf
BLAKE2b-256 7e8903090562764d165837c42b68b675b4b637b0fff9fb56374f3a962a1ca975

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.2.0.7-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.2.0.7-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 ec8201c4f0a1824d344af7733621fec684dd643b35e64413c247cfdb52b059b7
MD5 13d94c8600832bf39aa82874863071e2
BLAKE2b-256 2ca1593fc194a670580096de6f816dbe1fee7ff9de8dfb9c788745765dccb79d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 f2dfebf910b189672d19a1138de33e5ea28e5d3db02baa838658671182fd86e8
MD5 dd91f814318d8561fa7345ebd6c9d2d6
BLAKE2b-256 45af082fc894ae6eb5614a2120fac8ac638a1acc63fdf0bbbc5492af7c5aa8e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 8f1a6c4128587918d663f49b5455090bc97d2318d8f8f4445187d83b0dab1d26
MD5 1d1c2ceda29043fa3c5dee89773ec74e
BLAKE2b-256 e63636783d8ebbc6486f045702b7c795502fba93943a20afe79360261b579b23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e5d615ac82d8ea27db808bcdfd1d333a34717b6b2cbdb29936d9a2dc260aa17c
MD5 1f943a9f3054fa5aaa5afab300675a5f
BLAKE2b-256 8f1fd0c9d57dce5adfb5ebde8efbf6552256fc5b6f1ffedac4933dcc94583beb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b963a9a59317e66ad2b9562145fe7d240edd2ecf5210c432fab96a11ad0e81b9
MD5 8a89d7898785f3b2fa0513221809e100
BLAKE2b-256 ba4bb52c71778b2f86fd5693b0b2467873270f8ce22594c4ed89037d8d3b7296

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.2.0.7-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.2.0.7-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 6f7f8371c853973e3370f4411cb6d1af385e8a1cbdc0e99c6d60ae6347886666
MD5 422c61dd24d23fadc40c1d45ef7fcaad
BLAKE2b-256 58306a16c7bf8648238afa70e0ca27e864ff2d5a19bbaa2f21df6f7aa527c167

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e2dd68d5b30629260da0c8ca83e2d305303f6913a16a96ccb6ef5d5f76abf563
MD5 ae51054b5009333496bbdc0890beb380
BLAKE2b-256 2eaedb0a64ee438aa3e84e74c02e01d38e1dc60cab5201cd4192cb63e739322c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 49d86f60915ee1c6a33543cd61966f1b9b7b99d82999e9270f94e2191518eb5b
MD5 8a48fdad9db3917c433728f6c9f0e4f4
BLAKE2b-256 4ef4c901c435c433645a4cbf3c6d113cd17238cbd062be93e39ffc5b4f22f55b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 667d56a81ef253293186288e1eb290848430420bd70d6c9724ec23abb70a0b08
MD5 f5da3abdee9212ab1e2526caf9529f60
BLAKE2b-256 3470323020070a925c75d53042923265807c7915181921e0484911249f1d3336

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 bc8ab800f8a10f35de4624fba02198251d2d4b8e1b971438ca7bef477cd7881c
MD5 a11f0ce359266b97212bf44d0040ab75
BLAKE2b-256 1aa39b34119d668424be1ce101804b388e11f7f6c9c1089c8fd55524a71b491b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c53f96a980e65482f143e8458fd068fd6b287362df695e131ba5220710202db0
MD5 c017f1b04acf7b8a64d8d4115995c13b
BLAKE2b-256 923f91f4f7c1e99552de566fa694657a58b503ec4eb262684ab8a619eee917b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencv_contrib_python-3.2.0.7-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 bffd7e7ae319adf7cb837c876603c12bbaf1eca3a6bf541971b76ccff633cec9
MD5 e13dd283696a44eb8f5c42c09f2da2ee
BLAKE2b-256 cc4ec897dfd3657160a686f332b86729afa1286b9d89dddc1f1383f90e83725b

See more details on using hashes here.

File details

Details for the file opencv_contrib_python-3.2.0.7-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.2.0.7-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 d1436966e59442c6cc730f45c9bf87db3309681a2afc4fff9603fd750188c4ab
MD5 73ec2fdddc8d5c14457d2eecdec01216
BLAKE2b-256 9aefa20b9b4b65ff5fce62a2dbb13d342c1e01705d8ba502f4cc2b74682b4624

See more details on using hashes here.

Supported by

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