21
10

More than 3 years have passed since last update.

ImportError: libGL.so.1: cannot open shared object file: No such file or directory への対策

Posted at

やりたいこと

  • python で import cv2 をやりたい。

現象

.pyを実行すると下記エラー。

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

環境

tensorflowのDockerイメージを利用。下記手順で構築した。
https://qiita.com/kenichiro-yamato/items/ec944220321a58310f1f

対策

下記を実行したらエラーが出なくなった。

pip install opencv-python
pip install opencv-contrib-python
apt-get install -y libgl1-mesa-dev
21
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
10