Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
Asked Answered
B

11

10

Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.

Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.

Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."

I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.

Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?

Beshrew answered 8/4, 2013 at 20:19 Comment(1)
See if this helps at all https://mcmap.net/q/590602/-python-idle-subprocess-errorHydrogenate
P
15

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.

Peacoat answered 14/4, 2013 at 20:18 Comment(4)
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 UPBeshrew
Wow that is odd, I had a file called subprocess.py in my python directory. IDLE started opening correctly as soon as I moved it.Pasargadae
Note that that problem is there too if there is a file named like a python libray in your src files dir.Tirpitz
I just had the same problem, but with a file that was on the desktop instead of the python directory.Kahler
B
10

I'm running Windows 7 64-bit. I saw the same errors today. I tracked down the cause for me, hopefully it'll help you. I had IDLE open in the background for days. Today I tried to run a script in IDLE, and got the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." errors. So I closed all IDLE windows, and tried to restart IDLE. That then caused the same errors to pop up, and now IDLE wouldn't open successfully.

The cause was an extra pythonw.exe process running in the background. If I open up an instance of IDLE, then open a second, the second has issues connecting, and closes. But it does not close the instances of pythonw.exe that it opened, one is left running in the background. That extra instance then prevents future attempts to open IDLE.

Opening up Task Manager and killing all pythonw.exe processes fixed IDLE, and now it functions properly on my machine (1 instance open at a time though!).

Barbabas answered 13/6, 2014 at 18:39 Comment(0)
S
5

Look for files on your main python folder that you may create in names like "threading.py", "tkinter.py" and other names that overlapps with your Lib folder and move/delete them

Sedulity answered 22/2, 2014 at 16:11 Comment(1)
I use python on Mac OS and accidentally created a file named "math.py" on the Documents folder. This seems to conflict with the library autoload in python.Clute
A
3

Adding to existing answers - it is actually possible to have firewall block IDLE when not running with -n flag. I haven't used IDLE for a few months and decided to try if it works properly with newly installed python3.3 (on Linux Mint 13 x86). In between I made iptables setup much more aggressive and apparently it blocked idle-python3.3 from connecting to the Python RPC server. Sometimes it is just what the message says.

Ariew answered 24/7, 2013 at 19:32 Comment(0)
M
1

I had exactly the same issue :"IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."

I found the answer from this stackoverflow site. I created a file named string.py and that classhed with the normal python files. I removed the string.py and everything works now. Thanks folks.

Manhood answered 10/6, 2013 at 0:4 Comment(1)
I have the same issue when i created a file name code.py..your suggestion gave me a hint..."clash with normal python files". I rename the file to mycode.py and the errors gone.Anthropogeography
A
1

I had the same error message. Error not seen after I added all the *.exe filea to be found in the Python install directory to the Windows firewall exception list.

Aeriel answered 1/1, 2014 at 13:47 Comment(0)
N
1

I finally got it to work when I disabled ALL firewalls and antivirus, because some antivirus ALSO have firewall control. Ex. avast

Neolith answered 5/4, 2014 at 19:23 Comment(1)
I had the same problem but what I did was allow access for IDLE through my firewall so that it works.Gogol
D
1

Remove copy.py in your folder if you happen to have one

Dordrecht answered 1/1, 2015 at 13:3 Comment(0)
R
1

Using Windows 7 64 installation of Python 2.7.10 Shell I solved the above problem by opening the program as an administrator.

Royston answered 6/7, 2015 at 14:39 Comment(0)
B
0

i have the Same issue on os win7 64Bit and Python 3.1 and find a workaround because i have a Project with many .py files and just one gave this error. - Workaround is to copy a working file and copy the contents from not working file to working file. (i used Another editor as idle. The Problem with that workaround is... of you rename the file it doenst work. attention just rename the not working file doesnt work for me. just that copy paste. – john

Bruiser answered 27/5, 2016 at 9:16 Comment(0)
W
0

I came across this problem too. There are two things you can do

  1. You may already have a process running call pythonw.exe which prevents IDLE from being starting. End that task and try running IDLE again
  2. Use pythonwin or python command line
Windbound answered 3/2, 2017 at 11:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.