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

    xiaoxiao2023-03-24  2

    本教程系统环境

    系统: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 交互端

    输入命令

    # python Python 2.7.5 (default, Sep 15 2016, 22:37:39)  [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter >>>  无任何提示则说明安装成功

    转载请注明原文地址: https://ju.6miu.com/read-1201110.html
    最新回复(0)