Installing OpenCV 3.2.0 for Python 3.5.2 on Ubuntu 16.04.2 LTS
By Billal BEGUERADJ |
| 3 minutes
You will learn how to install OpenCV 3.2.0 on Ubuntu 16.04.2 LTS to work with Python 3.5.2.
Introduction
I just freshly finished the installation of Ubuntu 16.04.2 LTS on my new laptop, so I had to install the programming environments I need. As I am passionate of image processing and computer vision, I needed to re-install the latest version of OpenCV (3.2.0) to be able to use it with Python 3.5.2
The best way to work with Python libraries on a Linux platform is by relying on Python virtual environments which saves headaches caused by versions dependencies. This is why I suppose you have already installed virtualenv.
Nota bene
Do not even give a try to install the wrapper package for OpenCV python bindings:
1
pipinstallopencv-python
The reason is that this easy way of doing things will lead you to install a package which is not enough mature as you can not even deal with videos and can not even display an image using cv2.imshow() function. So do not be lazy and follow the below steps.
Installation steps
I am sharing with you what worked for me on my machine (64 bits):