Skip to content

Instantly share code, notes, and snippets.

@takurx
Last active November 18, 2022 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takurx/422804d1dca09deec822e6308a14003b to your computer and use it in GitHub Desktop.
Save takurx/422804d1dca09deec822e6308a14003b to your computer and use it in GitHub Desktop.
On Ubuntu 20.04 it install OpenCV 4.2.0

On Ubuntu 20.04 it install OpenCV 4.2.0

Preparation

sharo$kirima:~$ sudo apt update
sharo$kirima:~$ sudo apt upgrade -y
sharo$kirima:~$ sudo apt install -y build-essential

Install OpenCV-Python in Ubuntu

Ref. https://docs.opencv.org/3.4/d2/de6/tutorial_py_setup_in_ubuntu.html

sharo$kirima:~$ sudo apt install -y python3-opencv

It changed to python3-opencv from python-opencv.

Check OpenCV-Python

sharo@kirima:~$ python3
Python 3.8.2 (default, Apr 27 2020, 15:53:34) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2 as cv
>>> print(cv.__version__)
4.2.0
>>> exit()
@Seyed-Ali-Mohtashami
Copy link

tanx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment