解決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再執行上面的命令。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章