• I found that installing OpenCV in Raspbian or Ubuntu is the best when using sudo apt-get install python-opencv command. Check the StackOverflow discussion here, http://stackoverflow.com/questions/26537184/how-to-install-pyopencv-on-ubuntu.
  • Do not forget to upgrade the pip that you are using as well.
    • sudo pip install --upgrade pip
    • sudo pip3 install --upgrade pip
  • Do not forget to install Python C binding using these commands (for apt-get from Ubuntu repository).
    • sudo apt-get install python-dev
    • sudo apt-get install python3-dev
  • If you are not installing Python development package there will be an error like this.
utilsmodule.c:1:20: fatal error: Python.h: No such file or directory compilation terminated.

./20161216-0558-cet-install-opencv-in-ubuntu-also-raspbian-1.png

./20161216-0558-cet-install-opencv-in-ubuntu-also-raspbian-2.png

./20161216-0558-cet-install-opencv-in-ubuntu-also-raspbian-3.png

  • Official OpenCV installation tutorial from Ubuntu website. Although, I am concerned about the usage of third party installation script (what if the script is no longer working with the newer version of OpenCV?) the last time this web page updated was on August 2015, which is still quite new. Here is the link to the article, https://help.ubuntu.com/community/OpenCV.
  • Full size screenshot of the tutorial.

./20161216-0558-cet-install-opencv-in-ubuntu-also-raspbian-4.png

./20161216-0558-cet-install-opencv-in-ubuntu-also-raspbian-5.png