<p>首先让我介绍一些导致这个问题的背景信息。
我在win8.1笔记本电脑上安装了python的两个版本。最初Py2.5被设置为默认值。我这样做的方法是将python3.5的<code>python.exe</code>重命名为<code>python35.exe</code>和文件
<code>pythonw.exe</code>
作为<code>pythonw35.exe</code>,它似乎创建了两个与这两个文件同名的<code>.dll</code>文件(我不记得这两个dll文件在重命名之前是否存在),并成功地将python2.7设置为默认值(即,当我在命令行中键入命令<code>python</code>时,python2.7运行)。最近我需要将python3.5设置为默认值。然后,我继续以相同的方式重命名<code>Python 2.7</code>版本的文件名,并将3.5版本的文件名恢复为其原始的正常格式(即<code>python.exe</code>和<code>pythonw.exe</code>)。在</p>
<p><br/>
在所有这些混乱之后,我在空闲状态下运行<code>print("Hello World")</code>,它会弹出以下错误:</p>
<pre><code>IDLE internal error in runcode()
Traceback (most recent call last):
File "C:\Python35-32\lib\idlelib\rpc.py", line 339, in putmessage
r, w, x = select.select([], [self.sock], [])
TypeError: argument must be an int, or have a fileno() method.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python35-32\lib\idlelib\rpc.py", line 240, in asyncqueue
self.putmessage((seq, request))
File "C:\Python35-32\lib\idlelib\rpc.py", line 342, in putmessage
raise OSError("socket no longer exists")
OSError: socket no longer exists
</code></pre>