Installing OpenCV for Python3 (cv2) on Debian 8.7

I’m having an issue installing OpenCV for python3 (cv2) on Debain 8.7.

Both commands,

sudo pip install opencv-python

sudo pip3 install opencv-python

return the error,

Collecting opencv-python
Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python

I tried this on many of the other debian versions including the most updated versions, and versions pre-8.7 and have been unable to make it work anywhere.

python3 opencv is not available in jessie or stretch. I'm actually backporting opencv 3.2 from buster to stretch as I type this in order to get python3 support. It looks like you are using jessie though.

Any chance you have some instructions for this? i’m running stretch, and would love to find some direction to installing opencv with python bindings.

The tutorials i found were either based on old distributions or included alot of things that aren’t available any longer.

or were far too large for the limited amount of space on the device.

The debian packages I created are here: http://archive.ev3dev.org/debian/pool/main/o/opencv/

You can also add this repository to apt by creating a file /etc/apt/sources.list.d/ev3dev.list with the contents

    deb http://archive.ev3dev.org/debian stretch main

And add they GPG key with

    sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D57D95AF93178A7C