解决Port Binding Error:IDLE can't bind to a TCP/IP port, which is necessary to communicate

Python 报错:
Port Binding Error:
IDLE can’t bind to a TCP/IP port, which is necessary to communicate with its Python execution server. This might be because no networking is installed on this computer. Run IDLE with the -n command line switch to start without a subprocess and refer Help/IDLE Help ‘Running without a subprocess’ for further details. ”
解释:
端口绑定错误:
IDLE不能绑定到TCP/IP端口,这是与其Python执行服务器通信所必需的。这可能是因为此计算机上未安装网络。使用-n命令行开关运行IDLE可在没有子进程的情况下启动,有关详细信息,请参阅帮助/IDLE Help’Running without a subprocess’。”
解决办法:
在开始菜单栏输入cmd 回车 ,
在打开的终端输入下面的命令后按回车:
命令:netsh winsock reset
命令作用:重置winsock网络规范
最后重启机器就行了。
如果还是不行,再试试用管理员权限打开cmd再执行上面的命令。

你可能感兴趣的:(python相关,网络,cmd,python)