

- #INSTALL PYTHON 2.7 UBUNTU APT GET HOW TO#
- #INSTALL PYTHON 2.7 UBUNTU APT GET INSTALL#
- #INSTALL PYTHON 2.7 UBUNTU APT GET UPDATE#
- #INSTALL PYTHON 2.7 UBUNTU APT GET CODE#
- #INSTALL PYTHON 2.7 UBUNTU APT GET DOWNLOAD#
The pkg-config package is (very likely) already installed on your system, but be sure to include it in the above apt-get command just in case.
#INSTALL PYTHON 2.7 UBUNTU APT GET INSTALL#
Next, let’s install some developer tools: $ sudo apt-get install build-essential cmake pkg-config

#INSTALL PYTHON 2.7 UBUNTU APT GET UPDATE#
To start, open up your command line and update the apt-get package manager to refresh and upgrade and pre-installed packages/libraries: $ sudo apt-get update Most (in fact, all) steps in this tutorial will be accomplished by using your terminal. Step #1: Install OpenCV dependencies on Ubuntu 16.04 And as far as OpenCV goes, OpenCV 3 doesn’t care which version of Python you’re using: the bindings will work just the same.Īll that said, let’s get started installing OpenCV with Python bindings on Ubuntu 16.04.
#INSTALL PYTHON 2.7 UBUNTU APT GET CODE#
Keep in mind that Python 3 is the future - but also keep in mind that porting Python 2.7 code to Python 3 isn’t terribly challenging either once you understand the differences between the Python versions. I’ll simply say that you should use whichever version of Python you are comfortable with and use on a daily basis. Regarding which Python version you should use… I’m not getting into that argument. Make sure you are consistent with your decision, otherwise you will inevitably run into compile, linking, and import errors. I’ve highlighted the steps that require you to make a decision regarding which version of Python you would like to use. In either case, this tutorial will support both Python 2.7 and Python 3. There are plans to migrate to Python 3 and use Python 3 by default however, as far as I can tell, we are still a long way from that actually becoming a reality. Python 3.5.2 (can be accessed via the python3 command).Īgain, it’s worth repeating that Python 2.7 is still the default Python version used by Ubuntu.Python 2.7.12 (used by default when you type python in your terminal).The actual versions (as of 24 October 2016) are:
#INSTALL PYTHON 2.7 UBUNTU APT GET HOW TO#
Ubuntu 16.04: How to install OpenCVīefore we get into this tutorial, I want to mention that Ubuntu 16.04 actually ships out-of-the-box with both Python 2.7 and Python 3.5 installed. From there, just ignore the Python bindings and proceed as usual. Follow along with the instructions and perform the steps - by the end of this article you’ll have OpenCV installed on your system. Note: Don’t care about Python bindings and simply want OpenCV installed on your system (likely for C++ coding)? No worries, this tutorial will still work for you. To learn how to install OpenCV on your Ubuntu 16.04 system, keep reading. Inside this tutorial, I will document, demonstrate, and provide detailed steps to install OpenCV 3 on Ubuntu 16.04 with either Python 2.7 or Python 3.5 bindings.įurthermore, this document has been fully updated from my previous Ubuntu 14.04 tutorials to use the latest, updated packages from the apt-get repository. However, with support of Ubuntu 14.04 winding down and Ubuntu 16.04 set as the next LTS (with support until April 2021), I thought it would be appropriate to create a new, updated Ubuntu + OpenCV install tutorial. Install OpenCV 3.0 and Python 3.4+ on Ubuntu 14.04.Install OpenCV 3.0 and Python 2.7+ on Ubuntu 14.04.Over the past two years running the PyImageSearch blog, I’ve authored two tutorials detailing the required steps to install OpenCV (with Python bindings) on Ubuntu.
#INSTALL PYTHON 2.7 UBUNTU APT GET DOWNLOAD#
We need CMake to configure the installation, GCC for compilation, Python-devel and Numpy for building Python bindings etc.Click here to download the source code to this post You can skip optional dependencies if you don't want. Building OpenCV from sourceĬompiling from source may seem a little complicated at first, but once you succeeded in it, there is nothing complicated.įirst we will install some dependencies.

Also at some point in time, if you want to contribute to OpenCV, you will need this. So for getting latest source codes preference is next method, i.e. With respect to Python API, latest version will always contain much better support and latest bug fixes. For example, at the time of writing this tutorial, apt repository contains 2.4.8 while latest OpenCV version is 3.x. Apt repositories may not contain the latest version of OpenCV always. If the results are printed out without any errors, congratulations !!! You have installed OpenCV-Python successfully.
