Quantcast
Channel: 一言多いプログラマーの独り言
Viewing all articles
Browse latest Browse all 846

Matplotlibで「_tkinter.TclError: no display name and no $DISPLAY environment variable」のエラー

$
0
0
Matplotlibで「_tkinter.TclError: no display name and no $DISPLAY environment variable」のエラーです。


_tkinter.TclError: no display name and no $DISPLAY environment variable
よくわかりませんでしたが、GUI環境じゃないとダメなのか(汗)?!


$ python
>>> import matplotlib
>>>matplotlib.use('Agg')
>>> import matplotlib.pyplot as plt
>>>fig = plt.figure()

参考サイト
Matplotlib で no display name and no $DISPLAY environment variable が発生する(SaintSouth.NETさん)
$DISPLAYが未定義でmatplotlibがコケる問題を再発させない方法(Qiita)

Viewing all articles
Browse latest Browse all 846

Trending Articles