我正在使用pyinstaller为我们的PyQT工具打包一个Windows可执行文件。pyinstaller.exemain.py--pathpath_to_pyqt_libs--distpathoutputFolder--nametoolName5次中有4次,该工具找不到matplotlib后端TKagg:19537INFO:Matplotlibbackend"TkAgg":ignoredDLLloadfailed:Thespecifiedmodulecouldnotbefound.该过程仍然“成功”完成,但由于缺少库,我无法运行该工具。偶尔(约20%的时间)会找到(“添加”)库,并
ImportError:Cannotloadbackend'TkAgg'whichrequiresthe'tk'interactiveframework,as'qt'iscurrentlyrunning出现了一个类似标题的Importerror:"Inflorror:无法加载后端'tkagg',它需要"TK"交互式框架,因为"无头"当前正在运行"我解决问题的是重新启动我的内核,导入以下first:这是刚开始的样子:把plt放在TKAgg之后 这样就完美解决
我有这样的导入和代码:importpandasaspdimportnumpyasnpimportstatsmodels.formula.apiassmimportmatplotlib.pyplotasplt#ReadthedatafrompydatasetsrepousingPandasurl='./file.csv'white_side=pd.read_csv(url)#Fittingthemodelmodel=sm.ols(formula='budget~article_size',data=white_side,subset=white_side['producer']=="Pe
尝试运行this测试matplotlib如何与Tkinter一起工作的示例,我收到错误:(env)fieldsofgold@fieldsofgold-VirtualBox:~/new$pythontest.pyTraceback(mostrecentcalllast):File"test.py",line7,infrommatplotlib.backends.backend_tkaggimportFigureCanvasTkAgg,NavigationToolbar2TkAggFile"/home/fieldsofgold/new/env/local/lib/python2.7/sit