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)的更多相关文章

  1. Linux升级Python提示Tkinter模块找不到解决

    一.安装tkinter 在Linux中python默认是不安装Tkinter模块, [root@li250- ~]# python Python (r266:, Feb , ::) [GCC (Red ...

  2. Python GUI - tkinter

    目录: Tkinter 组件 标准属性 几何管理 代码实例: 1. Label & Button 2. Entry & Text 3.Listbox列表 4.Radiobutton单选 ...

  3. [转]windows环境下使用virtualenv对python进行多版本隔离

    windows环境下使用virtualenv对python进行多版本隔离 最近在用python做一个文本的情感分析的项目,用到tensorflow,需要用python3的版本,之前因为<机器学习 ...

  4. Django2.2使用mysql数据库pymysql版本不匹配问题的解决过程与总结

    前置条件 django版本:2.2.1 python版本:3.6.6 mysql版本:mysql-community8.0.15 问题 在搭建django项目,配置mysql数据库时遇到无法迁移数据库 ...

  5. Linux下使用Python的Tkinter库出现的No module named _tkinter问题

    这是由于python的版本没有包含tkinter的模块,只需要把tk的package安装就可以了. 一般在linux才出现,windows版本一般已经包含了tkinter模块.

  6. Python升级提示Tkinter模块找不到的解决方法

    一.安装tkinter在Linux中python默认是不安装Tkinter模块,复制代码 代码如下:[root@li250-193 ~]# pythonPython 2.6.6 (r266:84292 ...

  7. Tkinter系列教程01—引言和安装Tk—Python GUI编程

    目录 Tkinter教程系列01--引言和安装Tk 引言 什么是Tkinter 安装 Tk 为 Windows 安装 Tk 验证是否安装正确 为 GNU/Linux 安装 Tk 使用 Linux 的包 ...

  8. windbg sos版本不匹配问题解决

    dumpheap 时提示: 0:105> !dumpheap -stat The garbage collector data structures are not in a valid sta ...

  9. python开发学习-day01 (python安装与版本、字符串、字典、运算符、文件)

    *:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !important; } /* ...

随机推荐

  1. C++编程练习(3)----“实现简单的栈的顺序存储结构“

    栈(stack)是限定仅在表尾进行插入和删除操作的线性表. 允许插入和删除的一端称为栈顶(top),另一端称为栈底(bottom). 栈又称为后进先出(Last In First Out)的线性表,简 ...

  2. duilib 绘制IP控件

    在使用duilib时,发现本来的库并没有提供IP控件,如是自己想到绘制IP控件,控件的绘制不难,首先赋值UIEdit的两个文件,命名为UIIPEdit,更改完成后,便可以进行修改绘制IP控件. 绘制难 ...

  3. SVN-TortoiseSVN安装和常用操作步骤

    安装VisualSVN-Server-2.0.5 服务端: 运行VisualSVN-Server-2.0.5.msi程序,点击Next,下面的截图顺序即为安装步骤: 2 图2: 注意:Server P ...

  4. UI进阶 即时通讯之XMPP登录、注册

    1.XMPP环境搭建 http://www.cnblogs.com/fearlessyyp/p/5506644.html 第一次打开可能会有点儿慢,图片很多,步骤很详细,祝搭建成功. 2.工程中添加X ...

  5. 修改UITextField的占位文字颜色的三种层次

    层次一:利用富文本 // 描述占位文字属性 NSMutableDictionary *dict = [NSMutableDictionary dictionary] ; dict[NSForegrou ...

  6. tomcat启动异常、和web.xml缺少配置异常

    错误如下: 14-Feb-2017 10:50:00.665 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.Sta ...

  7. C语言程序_管理系统

    #include <stdio.h> #include <stdlib.h> #include <string.h> #define N 3 #define LEN ...

  8. MASM32快速起步

    MASM32是一个免费的软件程序,让您编辑Microsoft宏汇编程序(MASM)代码从一个基本的文本界面.它强调MASM代码各部分以不同的颜色,使其更容易扫描和检测错误.它提供了一个简单的布局程序员 ...

  9. margin-top、margin-bottom的一些分析

    margin-top:表示该容器距离上面容器的距离 情况一:如果该容器上面没有容器,则这个样式属性则被父容器占用了 html代码如下: <div id ="fa"> & ...

  10. Javascript继承(暂略去中转函数、组合继承和寄生继承)

    继承,在JS中通过原型链实现.如: function Box(){ this.name="Lee"; } function Desk(){ this.age=100; } //通过 ...