![]() We need CMake to configure the installation, GCC for compilation, Python-devel and Numpy for building Python bindings etc. 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. To install the latest Python 3.11 version, you can use deadsnakes team PPA which contains more recent Python versions packaged for Ubuntu. So for getting latest source codes preference is next method, i.e. If you are using the Python version that comes with your Linux distribution, you can install Matplotlib via your package manager, e.g.: Debian / Ubuntu. 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. However, you won’t be able to maintain your Python installation through the apt package manager. I recently got myself a new laptop a Lenovo x270 (yay) And once again I needed to set up a Python virtual environment. ![]() Apt repositories may not contain the latest version of OpenCV always. Installing Python on Ubuntu from Source Compiling Python from the source allows you to install the latest Python version and customize the build options. If the results are printed out without any errors, congratulations !!! You have installed OpenCV-Python successfully. ![]()
0 Comments
Leave a Reply. |