Solution of OpenCV library import error in Python 3

The solution of OpenCV library import error in python3

Operating environment:

Operating system: CentOS 7.9

Software environment: Python 3.6

Error problem description:

When using OpenCV library, error occurred when importing Library:

File "<stdin>", line 1, in <module>
File "/home/summer/.local/lib/python3.6/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

resolvent:

Enter the command in the terminal:

sudo yum update
sudo yum install mesa-libGL.x86_64

The update is complete.

Read More: