python 安装opencv-python 导入失败

sunliguo@3865u:~/ruizhi$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import cv2
Traceback (most recent call last):
File “”, line 1, in
File “/home/sunliguo/.local/lib/python3.9/site-packages/cv2/init.py”, line 8, in
from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

安装GL库

apt install libgl1-mesa-glx

随机文章:

发表评论