Skip to main content

Wrapper package for OpenCV python bindings.

Reason this release was yanked:

Deprecated release

Project description

OpenCV on Wheels

Unofficial pre-built OpenCV packages for Python.

Installation and Usage

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

  2. Select the correct package for your environment:

    There are four different packages and you should select only one of them. Do not install multiple different packages in the same enviroment.

    a. Packages for standard desktop environments (Windows, macOS, almost any GNU/Linux distribution)

    • run pip install opencv-python if you need only main modules
    • run pip install opencv-contrib-python if you need both main and contrib modules (check extra modules listing from OpenCV documentation)

    b. Packages for server (headless) environments

    These packages do not contain any GUI functionality. They are smaller and suitable for more restricted environments.

    • run pip install opencv-python-headless if you need only main modules
    • run pip install opencv-contrib-python-headless if you need both main and contrib modules (check extra modules listing from OpenCV documentation)
  3. Import the package:

    import cv2

    All packages contain haarcascade files. cv2.data.haarcascades can be used as a shortcut to the data folder. For example:

    cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")

  4. Read OpenCV documentation

  5. 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 fails with Could not find a version that satisfies the requirement ...?

A: Most likely the issue is related to too old pip and can be fixed by running pip install --upgrade pip. Note that PyPI does not currently support ARM architecture so you can't install these packages for example on Raspberry Pi.

Q: Import fails on Windows: ImportError: DLL load failed: The specified module could not be found.?

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.

If the above does not help, check if you are using Anaconda. Old Anaconda versions have a bug which causes the error, see this issue for a manual fix.

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).

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.

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 4 build matrix entries for each build combination: with and without contrib modules, with and without GUI (headless)
    • 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)

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 all packages use the same cv2 namespace explained above, uninstall the other package before switching for example from opencv-python to opencv-contrib-python.

Licensing

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

OpenCV itself is available under 3-clause BSD License.

Third party package licenses are at LICENSE-3RD-PARTY.txt.

All 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

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.

The default manylinux images have been extended with some OpenCV dependencies. See Docker folder for more info.

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 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

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

If you're not sure about the file name format, learn more about wheel file names.

opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-win_amd64.whl (39.2 MB view details)

Uploaded CPython 3.6mWindows x86-64

opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-win32.whl (27.8 MB view details)

Uploaded CPython 3.6mWindows x86

opencv_contrib_python_headless-3.4.1.15-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.2 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_headless-3.4.1.15-cp35-cp35m-win_amd64.whl (39.2 MB view details)

Uploaded CPython 3.5mWindows x86-64

opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-win32.whl (27.8 MB view details)

Uploaded CPython 3.5mWindows x86

opencv_contrib_python_headless-3.4.1.15-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.2 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_headless-3.4.1.15-cp34-cp34m-win_amd64.whl (39.2 MB view details)

Uploaded CPython 3.4mWindows x86-64

opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-win32.whl (27.8 MB view details)

Uploaded CPython 3.4mWindows x86

opencv_contrib_python_headless-3.4.1.15-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.2 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_headless-3.4.1.15-cp27-cp27m-win_amd64.whl (39.2 MB view details)

Uploaded CPython 2.7mWindows x86-64

opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-win32.whl (27.8 MB view details)

Uploaded CPython 2.7mWindows x86

opencv_contrib_python_headless-3.4.1.15-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.2 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_headless-3.4.1.15-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 74c61a29524ed2790f97776ef2637fdc82b33f947b063f83e456e9156aa73654
MD5 a48dd2dced1c36ee677f76b8ebb783c5
BLAKE2b-256 11b71db2733173fa05b0009fe03e6479aee314601cd6edfb4d1450e4bee5712b

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 12c382367f374eef290db94fcd3454022e81118eee81cb99a1143c7ed7a3c29a
MD5 9572ac60f1596e7665fa02fffa5defb8
BLAKE2b-256 bf9af76fcb918840762ec772ee4fe54123f9d9b2ed2d063172b526c03088f4e2

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4eaa40cd7331bd5023d7b460eeac35f5cea749b6b0ab7347045f9c1dabc24046
MD5 d597003aefe479fd9ef76eb72541b9d5
BLAKE2b-256 e6b1ca2193345d79ad1ad4dbd77cadb72ea15f2e5be7c55ba7e0ac07926efc14

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a710ceae8c61375a030bfec34edf3a5f24f57d5bfa3555f32900eb3a3035c203
MD5 ca417e5b43ccf6c7abb3895c892ce9d7
BLAKE2b-256 850eaa465158899704a8ac7520e2f722e47a8483d7715d7de6c14714aa6bb75a

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-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_headless-3.4.1.15-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 39d6a3cb0a1ff4539faa9788ba11711cc5ef7c0a02b59862abb8d43f322776cf
MD5 9165516a14b70bfd6a570666cc866513
BLAKE2b-256 1931130462ffebdbf29a5d35747dc49fe99f797134c30bf0e0bcd14a29b9758c

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 7a0d123d847686302a9af0f706a26c26f00e0ddff39c14b77549f9c0d68f04f3
MD5 b47b6b90ef86167308e76867ddd5d8c8
BLAKE2b-256 0852567b826518b0010df98249273736e15e8e49ccd38c028d47482dc43c02ed

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 65c7212c9f713d40a888ec5500ceffde95dcada8bce3c5362aa292477de86ec7
MD5 4766b1873408e308ab16131178cde7f0
BLAKE2b-256 624492f64101d9f5926badf7967477b4eab858a2eaa7c8e0308752020ae30650

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4386709839fab5d80f1df880bb66ccf0885a60e796438178560cff4167142758
MD5 3873ec47fa2c952c76fbc3c43ad56b3c
BLAKE2b-256 d1c7ab0b694c1472624cd289705bec39dc388acb66d98833b6702dd18b173c91

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 23cd00e0e974461c9f6eb95b17b1f243e1f0ac30509d72edcad43e11d865f062
MD5 7e40c10cafc8c58d69bfcbe8b53675d1
BLAKE2b-256 493acdf92b57a2db66ed5cbc08f79e4cef40483a3efceace9be16b63460d33e4

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-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_headless-3.4.1.15-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 637e5c0aef59147c96b89d37ee922013fe4a46450f39f26aa435bd74f3b50ecb
MD5 510d01e5328cd64e14ae83691abc9231
BLAKE2b-256 a8b925fa6ed5047fd0525c56529cf2d2ac4c958cf395f2ab9f447ac1ab21ed5a

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 a2afcce14ef4d9729cc9587405637b35560f4a24c63f1372a93157726771ab3b
MD5 5c833e24035ecbb19737d9e490339705
BLAKE2b-256 20d2f48c70e8fbec05cfc52afc87e7eaceaf1ff75f2329810653d1788b82e8d0

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 fbd1c550cf13570952b331ab17d42e79df007350de2961e7c3b21c2a591be2fa
MD5 8d8af9d4ddf66d307ff761cac8bf9808
BLAKE2b-256 3eb87ae6136b13e5a0285a45bfa2a7299630017eee0001bd9b7f0e1ec88c6db0

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fc6e0304250298679a53c9c537841a4fa81228f6a31c40ed2a741d632f174ee9
MD5 82e86ab387a2bd483497bccccec7463c
BLAKE2b-256 b1b3746a49cd68b0e8d9104beb40ff6dec8fd3cfdb074d46aa889a0555b39f26

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 803ea5b7bf14662c19b80c56cedbc34fee50a01db00e9cef9f97975caf0d737b
MD5 2442e97a73b3f7ca7489b05678dcec90
BLAKE2b-256 165b6b7f203e9d12d8b871e8ee1f000d0c2f2520ffba3e647084274602ec1f9e

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-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_headless-3.4.1.15-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 0870b2726b7c458b1b65d2a342b276fc3a846298b7f61c423f7f9b09c2791012
MD5 3311dfc273dcf2c150c6c230b925454d
BLAKE2b-256 8acb53bbd125ea7b4550a7bde8d7f72b32c8c2e46a9a6101b310fa8642d7d3ed

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 df8aa0cde39d5a873583d25e36a045f44438bc793d2fe09d1856dceedcbadc12
MD5 c7dde59ec373458c42138ebe25286d06
BLAKE2b-256 41a9b42494bd1cff3f40a0ca21039eefbdd27d6cf6438c521a990eb20cc2263e

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp27-cp27mu-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 cd22515f027beb1e7c84971f53d25139cd8c7d88b3f997c47dce00018d227d21
MD5 e4edbbc1342a799ebaf02f5f6864aaa2
BLAKE2b-256 86d014a90652f80f0a4f29f53523ad5241b99591bcd6cbee860c1a4330dbbd55

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 70574af2111dd22a7417bd748168e555753743b2307460be1c50bb3be9d11b7d
MD5 08f6bfd58d8027b0c90993ff0951cbc9
BLAKE2b-256 d2a24131b27c65efc8acfc00fbee153016bbc000e0c366a340e5027f59576721

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 971b9cb4a7fded609f5500c49befa0622403e2078a3d708bc993d02edccf17f6
MD5 07a3caa1de7bd7d70adff9f79e142c75
BLAKE2b-256 4206bdf92f1d4d89e1476f3d5e04f5426c69c416945f99d3fa13aeb06f2a4c06

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 659f1e8e4b8a8596941dfc7f18adeab9d063e706d21db5aa907b236120a4786d
MD5 a300349f1716b5b49fc77af63fcf7a62
BLAKE2b-256 f6bea86422e36e264a63969330d47a070c1297a3d088e3452eed3ffeca68c44e

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for opencv_contrib_python_headless-3.4.1.15-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 931d1dea9581c68c83f1d9552b558ea29753e1d9f9f4004a0d7b8420af74a132
MD5 da3f5575ab40c087b63253f188ae7a86
BLAKE2b-256 c99c2589274ed060742d18e0504bbce28923562daff7e1851d4a450931737cf9

See more details on using hashes here.

File details

Details for the file opencv_contrib_python_headless-3.4.1.15-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_headless-3.4.1.15-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 5fe3a4bcacb2786e253aee382b5c306abc7e5b3753c0d25c473402b19be7e8ea
MD5 048820a360b0fe71abb0d1d9e85ef279
BLAKE2b-256 f726544d1022279d288b732ad94ddd204b72d66d4d8ceeb9a6975d9b5160b194

See more details on using hashes here.

Supported by

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