2014-11-22 24 views
0

我的Python GUI不能再打开了!IDLE(Python GUI)2.7.8停止在Windows7上工作

我知道这个主题还有其他问题,但我解决不了我的问题!

我尝试卸载它并安装它,但没有打开。

我运行C:\ python27 \ python.exe -m idlelib.idle在cmd中查找错误,这里是CMD输出,

Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "C:\Python27\Lib\idlelib\run.py", line 5, in <module> 
    import socket 
    File "D:\python\lib\socket.py", line 8 
    c, addr = s.accept() # Establish connection with client. 
    ^
IndentationError: expected an indented block 

然后IDLE开放与子启动错误:

IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall is blocking the connection. 

我还添加了TCL_LIBRARY来指示Python路径C:\ Python27 \ tcl \ tcl8.5同时用户和系统变量,但它没有解决我的问题!

那么,我该如何让我的IDLE再次工作呢?

+1

什么是'D:\ python \ lib'在你的路径上做什么?这个'socket.py'文件是无效的,并且会破坏你的Python设置。 – 2014-11-22 21:56:14

+0

我记得我在Python初期就遇到过这个问题。我刚刚重新启动了我的IDLE,它工作得很好。 – HarryCBurn 2014-11-22 23:19:28

+0

@Martijn彼得斯,谢谢。我将这个文件夹添加到我的pythonpath中,将我自己的库放在这里!和socket.py有一些问题,我删除它,现在它工作正常。 – user3806649 2014-11-23 15:58:18

回答

1

文件D:\python\lib\socket.py不是标准库的一部分,但是正在导入,而不是正常的模块。该文件也被破坏,以多种方式破坏你的Python安装.s

重命名它或从PYTHONPATH配置变量中删除整个目录。