Search code examples
pythonopencvpipraspberry-piraspbian

pip3 install opencv-python error on Raspbian


I'm trying to install opencv-python using the following command sudo pip3 install opencv-python but I keep getting the following error
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none) ERROR: No matching distribution found for opencv-python
I tried upgrading the pip with the command pip install --upgrade pip and than trying again to install the opencv-python, but I'm still getting the same error.


Solution

  • This is due to the fact that there a no .whl on pypi for the raspberry architecture. You can also see this on the FAQ section of opencv-python README on Github:

    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 the wheel (especially manylinux) format does not currently support properly ARM architecture so there are no packages for ARM based platforms in PyPI. However, opencv-python packages for Raspberry Pi can be found from https://www.piwheels.org/.

    You should always check these pages for additional dependencies or installation notes for special architectures if you are facing any issues.

    Note that you can quickly get there by visitng the Pypi page and then selectin the Homepage button