解决 Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. 问题

1, 安装 tk-dev 和 python3-tk

sudo apt-get install tk-dev
sudo apt install python3-tk

2,修改 matplotlibrc 文件
sudo geidt  ~/.../lib/python3.6/site-packages/matplotlib/mpl-data/matplotlibrc
搜索:#backend      : Agg
替换为:     backend      : TkAgg

3,如果需要,重新安装 matplotlib:
pip uninstall -y matplotlib
pip --no-cache-dir install -U matplotlib

你可能感兴趣的:(Tools,python,deep,learning,Matplotlib)