How to install Tkinter module with python 2.7.5 in Redhat linux 7?

后端 未结 2 1523
[愿得一人]
[愿得一人] 2021-01-25 14:16

I have Python 2.7.5 in rhel-7x. I have tried to import Tkinter but i got a error as below

`Python 2.7.5 (default, Oct 11 2015, 17:47:16) 
 [GCC 4.8.3 20140911 (R         


        
相关标签:
2条回答
  • 2021-01-25 15:01

    In which redhat are you ? Enterprise, fedora, centOs ?

    yum install tkinter
    
    0 讨论(0)
  • 2021-01-25 15:03

    You need to enable the optional rpm repo in /etc/yum.repos.d/redhat.repo.

    You may find the section like below in the file, and set enable=1.

     [rhel-7-workstation-optional-rpms]
      ...
     enabled = 1
    

    After enabling the optional, the command sudo yum install tkinter may work as it does for me.

    0 讨论(0)
提交回复
热议问题