今天打开python idle不反应,然后通过网上搜索让我在安装目录下点击idle.py 弹出如图所示的错误,进行了很多尝试,任然没有得到解决,但是在尝试过程中发现了大家所说问题所在都是因为新建了一个.py脚本跟系统的.py文件冲突导致出现错误。
I had this same problem today. I found another stack overflow post where someone had a tkinter.py
file
in the same directory as python
,
and they fixed it by removing that tkinter.py
file.
When I looked in my python
directory,
I realized I had created a script called random.py
and
put it there. I suspect that it conflicted with the normal random module in python. When I removed this file, python started working again.
So I would suggest you look in your main python directory and see if there are any .py
files
that you could move to different places.
Yes, I also had named a program ‘random.py‘ lol. Something in Stackoverflow clued me in so I renamed my program. By that time I‘d already lost "edit with IDLE" so I added the registry entry: HKEY_CLASSES_ROOT\SystemFileAssociations\.py\shell\edit
with IDLE (py3)\command setting the value to: c:\python33\pythonw.exe c:\python33\lib\idlelib\idle.pyw -e %1 Then edit with IDLE was back and I ran the program from IDLE and it WORKED! I can‘t thank you enough for responding to my question and nailing it,
I really appreciate it. Wish would let me vote UP
这是其中一些网友回答,来源自:http://stackoverflow.com/questions/15888186/cant-run-python-via-idle-from-explorer-2013-idles-subprocess-didnt-make-c
还有这篇博客中也是说到类似新建脚本与系统脚本冲突问题然后使得出现上图错误问题:http://www.cnblogs.com/skyhiter/p/3381385.html
我对上面这些说法一一进行尝试都没能解决问题,所以我简单粗暴把python编译器完全卸载,进行重装,删除自己写的所有可能导致与系统.py文件冲突的脚本,问题得到解决,只是以前配置的各种python工具包需要又再一次进行配置。
python idle 错误 subprocess didn't make connection