MachineLearning
[ML] import cv2 cannot open shared object file no such file or directory
SweetDev
2022. 2. 23. 16:14
import cv2를 했는데
"""
cannot open shared object file no such file or directory
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
"""
에러가 난다면 libgl이 서치가 안되어서 실행이 안될 확률이 높다.
apt-get install libgl1-mesa-glx
pip install opencv-python
하니까 잘 되는 모습을 볼 수 있다.
만약
ModuleNotFoundError: No module named 'cv2'
에러가 뜬다면
pip install opencv-python
으로 설치해주면 된다.