gordon77
Posts: 4312
Joined: Sun Aug 05, 2012 3:12 pm

sudo pip3 install opencv-python fails...

Mon Jun 24, 2019 2:32 pm

using latest Raspbian...

Code: Select all

sudo  pip3 install opencv-python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting opencv-python


  Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python
Anyone know /explain why ?

User avatar
ben_nuttall
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 231
Joined: Sun Aug 19, 2012 11:19 am
Location: Cambridge, UK
Contact: Website

Re: sudo pip3 install opencv-python fails...

Mon Jun 24, 2019 4:52 pm

opencv don't release soirce distribution to PyPI, so there's nothing to build.

The only reason it's been available recently is that the piwheels project builds it from github and releases it.

We haven't built opencv for Buster yet. You'll have to be patient.

Ref:

https://pypi.org/project/opencv-python/
https://www.piwheels.org/project/opencv-python/
https://blog.piwheels.org/raspberry-pi- ... an-buster/
Community Manager - Raspberry Pi Foundation
Author of GPIO Zero and creator of piwheels

gordon77
Posts: 4312
Joined: Sun Aug 05, 2012 3:12 pm

Re: sudo pip3 install opencv-python fails...

Mon Jun 24, 2019 4:57 pm

Thanks for the explanation.

plugwash
Forum Moderator
Forum Moderator
Posts: 3477
Joined: Wed Dec 28, 2011 11:45 pm

Re: sudo pip3 install opencv-python fails...

Tue Jun 25, 2019 9:40 pm

You can also try the version from raspbian.

apt-get install python3-opencv

gordon77
Posts: 4312
Joined: Sun Aug 05, 2012 3:12 pm

Re: sudo pip3 install opencv-python fails...

Wed Jun 26, 2019 7:03 am

Thanks, modified my install..

Code: Select all

sudo apt-get install python3-opencv
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev 
sudo apt-get install libqtgui4 
sudo apt-get install libqt4-test
opencv now works, but gives a few anomalies on the image, lines, which I need to investigate.

but works OK when using pygame to display, opencv to capture (screen.jpg)
Attachments
screen.jpg
screen.jpg (33.92 KiB) Viewed 1657 times
Untitled.jpg
Untitled.jpg (64.36 KiB) Viewed 1663 times

ggNoOpenCV
Posts: 1
Joined: Wed Jun 26, 2019 12:46 pm

Re: sudo pip3 install opencv-python fails...

Wed Jun 26, 2019 12:49 pm

This command is only for version 3.2.0, is there no way to get a higher version on buster currently? Is there any stable os that supports new versions of opencv?

gordon77
Posts: 4312
Joined: Sun Aug 05, 2012 3:12 pm

Re: sudo pip3 install opencv-python fails...

Wed Jun 26, 2019 5:10 pm

ggNoOpenCV wrote:
Wed Jun 26, 2019 12:49 pm
This command is only for version 3.2.0, is there no way to get a higher version on buster currently? Is there any stable os that supports new versions of opencv?


Jessie and pip3 install opencv-python used to install v 3.4.4

Return to “Python”