ImportError: Cannot load backend ‘TkAgg‘ which requires the ‘tk‘ interactive framework,

ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'qt' is currently running

出现了一个类似标题的Importerror:" Inflorror:无法加载后端'tkagg',它需要" TK"交互式框架,因为"无头"当前正在运行"

我解决问题的是重新启动我的内核,导入以下 first :

这是刚开始的样子:

ImportError: Cannot load backend ‘TkAgg‘ which requires the ‘tk‘ interactive framework,_第1张图片

把plt放在TKAgg之后

ImportError: Cannot load backend ‘TkAgg‘ which requires the ‘tk‘ interactive framework,_第2张图片

 这样就完美解决

 

你可能感兴趣的:(windows,python,matplotlib,plotly)