9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jupyterでmatplotlibのインポートした時にImportErrorが出た時の対処法

Posted at

Jupyterでnumpy触っててimport matplotlib.pyplot as pltとかやった時に、

ImportError: libXext.so.6: cannot open shared object file: No such file or directory

とか

ImportError: libSM.so.6: cannot open shared object file: No such file or directory

とか

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

とか出た時に対処する方法

yum install libXext.x86_64
yum install libSM.x86_64
yum install libXrender.x86_64

インポートエラーが出たときは、Linux側でyum search < ライブラリ名 >でライブラリ一覧を出して、適切な物をインストールする。

例えば、

ImportError: libSM.so.6: cannot open shared object file: No such file or directory

の時は、

yum search libSM

として、一覧から環境によってインストールする物を選択して、yum installする。

エラーに表示が有る事をそのまま対処しただけですが…

9
10
2

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
9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?