python的tkinter版本不匹配问题:RuntimeError: test:tk.h version (8.4) doesn't match libtk.a version (8.5)
Traceback (most recent call last):
File "/root/CodeWorkPace/test/TCPClient.py", line 20, in <module>
plt.pie(sizes,explode=explode,labels=labels,colors=colors,autopct='%1.1f%%',shadow=True,startangle=50)
File "/opt/python3/lib/python3.4/site-packages/matplotlib/pyplot.py", line 3280, in pie
ax = gca()
File "/opt/python3/lib/python3.4/site-packages/matplotlib/pyplot.py", line 949, in gca
return gcf().gca(**kwargs)
File "/opt/python3/lib/python3.4/site-packages/matplotlib/pyplot.py", line 586, in gcf
return figure()
File "/opt/python3/lib/python3.4/site-packages/matplotlib/pyplot.py", line 535, in figure
**kwargs)
File "/opt/python3/lib/python3.4/site-packages/matplotlib/backends/backend_tkagg.py", line 81, in new_figure_manager
return new_figure_manager_given_figure(num, figure)
File "/opt/python3/lib/python3.4/site-packages/matplotlib/backends/backend_tkagg.py", line 89, in new_figure_manager_given_figure
window = Tk.Tk()
File "/opt/python3/lib/python3.4/tkinter/__init__.py", line 1807, in __init__
self._loadtk()
File "/opt/python3/lib/python3.4/tkinter/__init__.py", line 1822, in _loadtk
% (_tkinter.TK_VERSION, tk_version))
RuntimeError: test:tk.h version (8.4) doesn't match libtk.a version (8.5)
搞了好多天,为了解决版本不匹配的问题,网上也没给明确的解决方案,所以直接把版本判断的语句注释掉了,也就能用了,如图:

改为:

这个文件在python的安装包下的 /lib/python3.4/tkinter/__init__.py 文件当中
无赖的报错解决了~·
python的tkinter版本不匹配问题:RuntimeError: test:tk.h version (8.4) doesn't match libtk.a version (8.5)的更多相关文章
- Linux升级Python提示Tkinter模块找不到解决
一.安装tkinter 在Linux中python默认是不安装Tkinter模块, [root@li250- ~]# python Python (r266:, Feb , ::) [GCC (Red ...
- Python GUI - tkinter
目录: Tkinter 组件 标准属性 几何管理 代码实例: 1. Label & Button 2. Entry & Text 3.Listbox列表 4.Radiobutton单选 ...
- [转]windows环境下使用virtualenv对python进行多版本隔离
windows环境下使用virtualenv对python进行多版本隔离 最近在用python做一个文本的情感分析的项目,用到tensorflow,需要用python3的版本,之前因为<机器学习 ...
- Django2.2使用mysql数据库pymysql版本不匹配问题的解决过程与总结
前置条件 django版本:2.2.1 python版本:3.6.6 mysql版本:mysql-community8.0.15 问题 在搭建django项目,配置mysql数据库时遇到无法迁移数据库 ...
- Linux下使用Python的Tkinter库出现的No module named _tkinter问题
这是由于python的版本没有包含tkinter的模块,只需要把tk的package安装就可以了. 一般在linux才出现,windows版本一般已经包含了tkinter模块.
- Python升级提示Tkinter模块找不到的解决方法
一.安装tkinter在Linux中python默认是不安装Tkinter模块,复制代码 代码如下:[root@li250-193 ~]# pythonPython 2.6.6 (r266:84292 ...
- Tkinter系列教程01—引言和安装Tk—Python GUI编程
目录 Tkinter教程系列01--引言和安装Tk 引言 什么是Tkinter 安装 Tk 为 Windows 安装 Tk 验证是否安装正确 为 GNU/Linux 安装 Tk 使用 Linux 的包 ...
- windbg sos版本不匹配问题解决
dumpheap 时提示: 0:105> !dumpheap -stat The garbage collector data structures are not in a valid sta ...
- python开发学习-day01 (python安装与版本、字符串、字典、运算符、文件)
*:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !important; } /* ...
随机推荐
- WebForm 控件(一)、连接数据库
一.控件 [简单控件] (一)文字显示 1.Label → 在html中相当于span <asp:Label ID="控件名 runat="server" Tex ...
- Biztalk AS2开发经验总结
一. 准备证书 4 1. 升级win2008 R2证书服务 4 2. 申请证书 6 二. 配置证书 13 1. 为AS2配置证书 13 2. ...
- 基于Selenium2与Python自动化测试环境搭建
简介: selenium 是一个web的自动化测试工具,不少学习功能自动化的同学开始首选selenium ,相因为它相比QTP有诸多有点: * 免费,也不用再为破解QTP而大伤脑筋 * 小巧,对于 ...
- 一个技术汪的开源梦 —— 微信开发工具包(WeixinSDK)
由于春节的关系 WeixinSDK 这个开源项目的进展比预期推迟了大约一个月的时间,值得高兴的是到目前为止该项目的重要模块已经开发完毕. - 关于项目 该项目的背景是现在微信公众号.微信服务号乃至微 ...
- eclipse设置统一编码
1.Window-->Preferences-->General-->Workspace->Text file encoding->Other->UTF-8. 2. ...
- find查找命令
find # 格式 find [路径] [参数] [表达式] -exec 指令 {} \ ; -{} 代表find找到的文件 -\ 禁止转意 : 表示本行指令结束 # find /sbin -type ...
- c#访问数据库的两种方法以及事务的两种方法
//2015/07/03 using System; using System.Collections.Generic; using System.Linq; using System.Text; u ...
- 配置FindBugs和常见FindBugs错误
配置FindBugs: 在这里可以对FindBugs规则等进行详细设置. 选择你的项目,右键 => Properties => FindBugs => 1 Run Automatic ...
- 网络服务器系统wamp的安装
第一步,下载wamp Server 可以百度查找下载,也可以到WAMP的官方网站http://wampserver.com/en下载,官网下载会比较慢. 第二步,下载之后,双击运行,安装 第三步,解压 ...
- http-server 命令行
安装 (全局安装加 -g) : npm install http-server (npm install --global http-server) 在站点目录下开启命令行输入 http server ...