Python 2.7.2 IDLE shell not working

微笑、不失礼 提交于 2019-12-13 04:10:09

问题


For some reason the python 2.7.2 IDLE shell is not opening. I get an error that says:

"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 to HELP/IDLE Help 'Running without a subprocess' for further details."

It was working fine the day before and I can't think of any changes I have made to the computer*(windows 7) that could have caused it to stop working. I have tried uninstalling and reinstalling it but it still has the same problem. I have added it to the exceptions on my firewall but nothing helps it.

Any help is appreciated :)


回答1:


See a similar problem with solution here:-
http://www.cs.ucsb.edu/~pconrad/cs8/topics/idle/

If you think port number 8833 might be used by some other process, check that by giving this in command prompt:-

netstat -aon | find "8833"



回答2:


There I see 2 possible problems:

  1. The port is used by other process, how told vaisakh.
  2. In your case don't show the specific port, can be the network interface is not up. Review your 'interfaces' file and be sure lo is up

Run:

sudo ifconfig

if there isn't lo, then

sudo ifconfig lo up



回答3:


The first thing you need to do is locate your python on your computer by right clicking on it and clicking properties. After that go into your file folder and follow the path that the property finder told you, then find something that looks like this:

C:\Users\DELL\AppData\Local\Programs\Python\Python36\Lib\idlelibCidle.pyw

Don't copy this because it's the path to python on my computer, but make sure your line looks similar at the end of my line. Copy the line that looks similar to the one above and paste it or write in the command prompt and then press space and add the -n to it and hit enter. Don't add the C: at the beginning if it is already written in the command prompt, but make sure you add the \



来源:https://stackoverflow.com/questions/9477214/python-2-7-2-idle-shell-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!