【编程语言】Python Tkinter模块安装 CentOS 7 下

来源:互联网 发布:知乎你见过最阴暗的事 编辑:程序博客网 时间:2024/04/30 06:32

本教程系统环境

系统:CentOS 7

Python 版本:python 2.7.5



打开python shell 端,输入以下命令

import Tkinter
出现以下内容

Traceback (most recent call last):  File "<stdin>", line 1, in <module>ImportError: No module named Tkinter
说明系统中没有安装Python Tkinter模块


安装Python Tkinter模块

输入以下命令

yum -y install tkinter


安装完成之后再次打开shell 交互端

输入命令

# pythonPython 2.7.5 (default, Sep 15 2016, 22:37:39) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import Tkinter>>> 

无任何提示则说明安装成功




0 0
原创粉丝点击