IDLE(Python GUI)2.7.8停止在windows7上工作

时间:2014-11-22 21:54:48

标签: python python-2.7 python-idle

我的Python GUI不再打开了!

我知道这个话题还有其他问题,但我无法解决我的问题!

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

我在cmd中运行C:\ python27 \ python.exe -m idlelib.idle来查找错误,这里是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 个答案:

答案 0 :(得分:1)

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

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

相关问题