A Simpler Way to Install OpenCV 4.1.0 on Raspberry Pi

A few weeks ago, I made a tutorial (this one), but that’s not simple enough, and that’s the reason for this post.

Install Dependencies

$ sudo apt-get update
$ sudo apt-get install libjpeg-dev
$ sudo apt-get install libatlas-base-dev
$ sudo apt-get install libjpeg-dev
$ sudo apt-get install libtiff5-dev
$ sudo apt-get install libpng12-dev
$ sudo apt-get install libqtgui4 libqt4-test
$ sudo apt-get install libjasper-dev

Install OpenCV

Prerequisite: Install pip3 (190504 Update)

$ sudo apt-get install python3-pip

Install opencv-python

The following command automatically installs the latest opencv-python library.

$ sudo pip3 install opencv-python