0

When I am using opencv in CentOS, shows this error:

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

and I am install opencv like this:

[root@izbp19pke6x0v6ruecuy1yz pydolphin]# pip3 install opencv-python
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting opencv-python
  Downloading http://mirrors.aliyun.com/pypi/packages/6d/80/10a9ae6fa0940f25af32739d1dc6dfdbbdc79af3f04c5ea1a6de4303cd54/opencv_python-4.4.0.46-cp36-cp36m-manylinux2014_x86_64.whl (49.5 MB)
     |################################| 49.5 MB 10.2 MB/s
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib64/python3.6/site-packages (from opencv-python) (1.19.2)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.4.0.46

what I am missing, what should I do to fix this problem?

Dolphin
  • 29,069
  • 61
  • 260
  • 539
  • Install this ("libgl1-mesa-dev") it seems to have resolved the same issue for ubuntu referance https://codeslake.github.io/ubuntu/docker/docker-libGL-error/ – Sachin Rajput Dec 12 '20 at 10:53
  • Did you see https://stackoverflow.com/questions/60628083/importerror-libgl-so-1-on-centos? There's a possible solution posted in the question itself, which did not work in Docker for that person but it might work for you. – Thomas Dec 12 '20 at 10:54

0 Answers0