Skip to content

Instantly share code, notes, and snippets.

@aoirint
Last active February 21, 2020 16:06
Show Gist options
  • Save aoirint/d069cc6f35d1081b9240a024ddc74312 to your computer and use it in GitHub Desktop.
Save aoirint/d069cc6f35d1081b9240a024ddc74312 to your computer and use it in GitHub Desktop.
Raspberry Pi 4 (Raspbian Buster) OpenCV Python Install

https://www.piwheels.org/project/opencv-python/

/etc/pip.conf

[global]
extra-index-url=https://www.piwheels.org/simple

Commands

sudo apt install libtiff5 libpango-1.0-0 libavcodec58 libgdk-pixbuf2.0-0 libjasper1 libqt4-test libpangocairo-1.0-0 libswscale5 libilmbase23 libatk1.0-0 libgtk-3-0 libqtcore4 libcairo2 libwebp6 libavutil56 libcairo-gobject2 libopenexr23 libqtgui4 libavformat58
sudo apt install liblapack-dev
sudo apt install libatlas-base-dev

# https://github.com/piwheels/packages/issues/59#issuecomment-554767058
pip3 install opencv-python==4.1.0.25

Ref

/etc/apt/sources.list

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment