import cv2 in Sagemaker Studio jupyter notebook throws ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Viewed 2811
2 Answers

use this from sagars answer from here

sudo apt update
sudo apt install libgl1-mesa-glx

If your environment does not allow you to sudo, you can instead of the standard opencv-python package, get the headless version of it

!pip install opencv-python-headless

which brings its binaries with it

Related