【导入 cv2错误】】ImportError: libGL.so.1: cannot open shared object file: No such file or directory
·
(model) [root@ai kiln_fire_line1_rec]# python
Python 3.7.5 (default, Oct 25 2019, 15:51:11)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/anaconda3/envs/model/lib/python3.7/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
>>> exit()
解决办法:
For Red Hat/CentOS/Fedora systems:
sudo yum -y install mesa-libGL
For Debian/Ubuntu systems:
sudo apt-get -y install libgl1-mesa-glx

更多推荐
所有评论(0)