python3.6-tkinter
作者:互联网
matplotlib升级到3.3.4后,程序中使用matplotlib绘图会提示"Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure",查阅资料说是采用如下方法可以解决:
import matplotlib
matplotlib.use('TkAgg')
修改后结果提示
ModuleNotFoundError: No module named '_tkinter'
应该安装python3-tk:
sudo apt-get install python3-tk
但是python3-tk默认作为python3.5版本的库.
下载python3-tk_3.6.5-3_amd64.deb,提取/usr/lib/python3.6/lib-dynload/_tkinter.cpython-36m-x86_64-linux-gnu.so复制到相应目录即可.
标签:tkinter,lib,matplotlib,python3.6,tk,python3 来源: https://blog.csdn.net/denlee/article/details/120949834