2

I'm trying to install OpenCV for python with extra modules on my raspberry pi. The OpenCV website has a set of instructions that I have tried with different variations for the past several months. I have concluded over ~25 attempts that these will not work. Since I'm only going to be using OpenCV in python, I have changed tactics to just using pip to install opencv with modules.

However when I try I get this:

The error I receive

Opencv-contrib-python is in the pip packages list, as well as on the PyPI website. I have run pip(3) install --upgrade pip as the PyPI page suggests. If I link directly to the PyPI page download link, I receive this error.

The next error I recieve

This issue is only with the contrib modules. pip(3) install opencv-python works.

How do I install the package successfully?

Falcondance
  • 23
  • 1
  • 4

1 Answers1

1

opencv-contrib-python contains pre-compiled binaries, which, by their nature, only work for a specific architecture. Pip only has builds for x86 and x86_64 (no ARM builds, which is what you'd need on a Pi).

You will need to compile OpenCV yourself instead, since there aren't any available binaries for ARM processors. Be aware that since the Pi isn't very beefy, this will likely take a non-trivial amount of time (this site claims 2.8 hours for the Pi 2 and 9.5 hours for the original B+, and this site estimates about 1.5 hours for a Pi 3).

For instructions on compiling OpenCV, see: How to install OpenCV on Raspberry Pi 3 in Raspbian Jessie?

Aurora0001
  • 6,357
  • 3
  • 25
  • 39