1

I searched this topic before but still I couldnt find the answer. I'm trying a guide on Object Detection using tensorflow on Raspberry Pi. I'm currently using Raspberry Pi3. So I followed a guide and this is the place I got stuck, I stuck at installing opencv-python, no matter what I try it always comes out with

Could not find a version that satisfies the requirement opencv-python

The Raspbian Version I'm currently on is Raspbian Buster 10/7/2019 Python 2.7 Python 3.7.3

I'm not sure whether if it's the version of tensorflow/python is making me unable to install opencv-python. The current version of tensorflow on my RPi is 1.13.

I tried removing python 3.7 and installed python 3.5, but that led me to boot loop so I had to reinstall Raspbian again. I tried

sudo pip3 install opencv-contrib-python
pip3 install opencv-python
pip install opencv-python

None of them succeeded

Before installing opencv-python i need to install some dependencies, these codes run successfully ,

sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install qt4-dev-tools

pip3 install opencv-python (this is where I failed)

ERROR: Could not find a version that satisfies the requirement opencv-python(fromversion:)

4
  • Tried pip3 install python-opencv? Commented Aug 1, 2019 at 15:51
  • @Jammy Dodger Is it the same? Commented Aug 1, 2019 at 15:56
  • @Jammy no i havent tried, is it the same? Commented Aug 1, 2019 at 15:56
  • I've heard it mentioned, and I believe it's the same Commented Aug 1, 2019 at 16:01

3 Answers 3

1

Try upgrading your pip:

pip install --upgrade pip
pip install opencv-python

If that doesn't work, you may have to download the open-cv source code directly and use that instead: https://github.com/skvark/opencv-python. You will have to compile and install the source yourself.

Sign up to request clarification or add additional context in comments.

1 Comment

I'll try now and provide update. But I dont know how to install from source, from the link you provided... Could you help me with that?
1

I could install OpenCV for buster on a 3B using apt:

sudo apt-get install python3-opencv

Depending on what you're doing you might need these other packages:

sudo apt-get install libcblas-dev libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev libqtgui4 libqt4-test

Comments

0

Try this:

pip3 install --upgrade setuptools pip
pip3 install opencv-python

I hope it works out.

1 Comment

Im not sure if it is because the Raspbian i installed is Raspbian Buster, and not Stretch which caused this failure. Nevertheless I installed thru source file...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.