4
3

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 1 year has passed since last update.

VcXsrvを使ってmatplotlibでグラフを出力するとlibGL errorが起きる

Posted at

CentOSとWindowsをX serverで繋ぎ、matplotlibでグラフを出力した時に以下のエラーが出ました。

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

グラフは正しく出力されたのですが、エラーはエラーなので直したいですね。

対処法

.bashrcか.bash_profileに以下の行を加える。

export LIBGL_ALWAYS_INDIRECT=1

この変数を定義すると libGL はハードウェア アクセラレーションではなく必ず間接レンダリングを使うようになります。

参考文献

4
3
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
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?