Search code examples
opencvraspberry-pi3pypi

Install packages from PYPI in Raspberry Pi


I want to install a precompiled version of OpenCV 3.4.2 in the Raspberry using the following commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install pip3
sudo pip3 install opencv-python

But it failed and the error message was: "Could not find a version that satisfies the requirement opencv-python (from versions: ) No matching distribution found for opencv-python"

Then tried the following commands but the result was the same:

sudo apt-get install python3-pip
sudo pip install opencv-python

I had not problems installing it on my PC with ubuntu 16 using the same commands. This is the page im using for reference https://pypi.org/project/opencv-python/

I'm using Raspbian Jessie Lite, Python 3.4


Solution

  • The list of downloadable files for opencv includes binary wheels for many Python versions but for limited set of architectures: MacOSX on Intel, Linux on Intel 32 and 64 bits, Windows on Intel 32 and 64 bits. Raspberry Pi processors absent and there is no source code so pip cannot compile it.

    The FAQ recommends to look up Pi wheels at https://www.piwheels.org/.