2017-04-27 10 views
1

私はrhel-7xにPython 2.7.5を持っています。私はTkinterのをインポートしようとしたが、私はあなたがPythonのバージョン2.7.5を使用したRHEL-7XにはTkinterモジュールをインストールするために私を助けることができるPython 2.7.5でTkinterモジュールをRedhat linux 7にインストールするには?

`Python 2.7.5 (default, Oct 11 2015, 17:47:16) 
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import Tkinter 
     Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
     ImportError: No module named Tkinter` 

以下のようにエラーが発生しましたか?ありがとうございます...

答えて

3

あなたはどのレッドハットですか?企業、フェドラ、centOS?

yum install tkinter 
+0

申し訳ありませんでしたrhel –

+0

赤い帽子バージョン7.2 –

0

/etc/yum.repos.d/redhat.repoでオプションのrpm repoを有効にする必要があります。

ファイル内で次のようなセクションがあり、enable=1と設定されている場合があります。それは私のために行うよう

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

オプションを有効にした後、コマンドsudo yum install tkinterが動作する可能性があります。

関連する問題