- #Install python 2.7 ubuntu server 14.04 how to#
- #Install python 2.7 ubuntu server 14.04 install#
- #Install python 2.7 ubuntu server 14.04 update#
- #Install python 2.7 ubuntu server 14.04 code#
#Install python 2.7 ubuntu server 14.04 install#
$ sudo apt-get install libxvidcore-dev libx264-dev Okay, so now we have libraries to load images from disk - but what about video? Use the following commands to install packages used to process video streams and access frames from cameras: $ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev We install the necessary ones below: $ sudo apt-get install libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev In order to load these images from disk, OpenCV actually calls other image I/O libraries that actually facilitate the loading and decoding process. Therefore, OpenCV needs to be able to load various image file formats from disk such as JPEG, PNG, TIFF, etc. OpenCV is an image processing and computer vision library. The cmake program is used to automatically configure our OpenCV build. 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. Next, let’s install some developer tools: $ sudo apt-get install build-essential cmake pkg-config
#Install python 2.7 ubuntu server 14.04 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 server 14.04 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 server 14.04 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.
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. Click here to download the source code to this post