python3安装提示** IDLE can't import Tkinter. Your Python may not be configured for Tk. **

 

linux下面安装python3,使用idle3的时候提示:

** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** 

下面给出解决方案,首先安装tcl-devel和tk-devel,然后把python3重新编译和安装即可

[root@Azuo Desktop]# yum install tk-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.esocc.com
 * extras: mirror.esocc.com
 * updates: mirror.esocc.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tk-devel.i686 1:8.5.7-5.el6 will be installed
--> Processing Dependency: tcl-devel = 1:8.5.7 for package: 1:tk-devel-8.5.7-5.el6.i686
--> Running transaction check
---> Package tcl-devel.i686 1:8.5.7-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                    Arch                                                  Version                                                        Repository                                             Size
=============================================================================================================================================================================================================================================
Installing:
 tk-devel                                                   i686                                                  1:8.5.7-5.el6                                                  base                                                  496 k
Installing for dependencies:
 tcl-devel                                                  i686                                                  1:8.5.7-6.el6                                                  base                                                  162 k

Transaction Summary
=============================================================================================================================================================================================================================================
Install       2 Package(s)

Total download size: 658 k
Installed size: 1.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): tcl-devel-8.5.7-6.el6.i686.rpm                                                                                                                                                                                 | 162 kB     00:00    
(2/2): tk-devel-8.5.7-5.el6.i686.rpm                                                                                                                                                                                  | 496 kB     00:01    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        293 kB/s | 658 kB     00:02    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:tcl-devel-8.5.7-6.el6.i686                                                                                                                                                                                              1/2
  Installing : 1:tk-devel-8.5.7-5.el6.i686                                                                                                                                                                                               2/2
  Verifying  : 1:tk-devel-8.5.7-5.el6.i686                                                                                                                                                                                               1/2
  Verifying  : 1:tcl-devel-8.5.7-6.el6.i686                                                                                                                                                                                              2/2

Installed:
  tk-devel.i686 1:8.5.7-5.el6                                                                                                                                                                                                               

Dependency Installed:
  tcl-devel.i686 1:8.5.7-6.el6                                                                                                                                                                                                              

Complete!

你可能感兴趣的:(python3安装提示** IDLE can't import Tkinter. Your Python may not be configured for Tk. **)