22

I am new to programming and i decided to learn Python first, so;

I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.".

My firewall is not problem beacuse I put Python throught it. I also tried to reinstall it and it didnt made diffirence. So please if somenone can help!

Thank you on your time :D

Usce
  • 417
  • 1
  • 7
  • 18
  • Hard to guess, because IDLE is a nice tool that works almost anywhere Python runs. What is your OS and how did your install Python 3.4 ? – Serge Ballesta Apr 10 '15 at 17:44
  • My OS is Windows 7, and i downloaded it on python.org the latest version then installed via their installer. – Usce Apr 10 '15 at 17:56
  • https://docs.python.org/3/library/idle.html#startup-failure summarizes the answers I gleaned from the answer to this and similar questions. – Terry Jan Reedy Feb 05 '20 at 21:15
  • Hi @Usce, consider disabling your antivirus for 10 minutes. – Amninder Singh Apr 10 '20 at 14:11
  • Possible duplicate of: [Can't run Python via IDLE from Explorer \[2013\] - IDLE's subprocess didn't make connection](https://stackoverflow.com/questions/15888186/cant-run-python-via-idle-from-explorer-2013-idles-subprocess-didnt-make-c) – Anonymous Nov 04 '20 at 23:00

12 Answers12

33

Delete all newely created .py files in the directory with Python. for example random.py, end.py - that was my problem that caused the same notification window. Reason in filename conflicts.

Igor Tischenko
  • 620
  • 9
  • 20
5

It may be a common problem that happens when you have in you current directory a file with same name on one from Python (references : Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection)

It seems it can also happen if you have incorrect environment variables such as HOMEPATH USERPROFILE (references : Issue 14576: IDLE: inconsistent use of HOMEDRIVE, HOMEPATH, and USERPROFILE on Windows)

I've found another related question : Python IDLE subprocess error?

My advice if the answer is not there : google may be your friend ! The 3 clues above come from there :-)

Community
  • 1
  • 1
Serge Ballesta
  • 143,923
  • 11
  • 122
  • 252
4

Simple...rename your .py file with some name different from any keyword name like 'random.py' which already exists in python package.

Eg. I named one file as "random.py". The same error popped up. I renamed it to "random_demo.py". It worked. The different naming discards the problem of ambiguity between an already existing file and a newly created file with same name.

Sujatha
  • 87
  • 3
  • What .py file? For a fresh install there isn't one. This is just to open IDLE from a menu. The error may be similar? – mckenzm Apr 10 '21 at 21:26
4

The fix is here .

Open task manager, kill pythonw.exe, if you find 2 instances or more. Should work after that.

Community
  • 1
  • 1
Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92
3

I fixed it, I needed to run IDLE with admin privileges. (I am using Windows 7 x64). Hope this helps.

  • 6
    if you need admin privileges, to run IDLE; something is broken. – jfs Nov 16 '15 at 01:40
  • 1
    why would that be the case? – jmich738 Dec 02 '15 at 08:23
  • 1
    Python can be installed either for 'all users' or 'current user only'. If one can only run python as admin, it must have been installed 'current user only' as admin, which is usually not a good idea. Better to install for all users or for a particular non-admin user only. – Terry Jan Reedy Feb 05 '20 at 20:05
2

For me: The drive pointed to by HOMEDRIVE was not writeable. I checked this by running idle the hard way, explicitly using python.exe rather than pythonw.exe:

C:\coding\xyz>"C:\Python27\Lib\idlelib\..\..\python.exe"  
"C:\Python27\Lib\idlelib\idle.pyw"

 Warning: unable to create user config directory
P:\.idlerc
 Check path and permissions.
 Exiting!
brasofilo
  • 25,496
  • 15
  • 91
  • 179
amonroejj
  • 573
  • 4
  • 16
0

I had a similar problem with a file called "test.py" and Python 2.7.9 - renaming the file to something else solved my issue. After checking, I noticed that there is a file with the same name under the Python27\Lib folder.

Seems to be a bug in IDLE.

0

Just had the same issue. So uninstalled and reinstalled which fixed it and took 10 minutes. The key with Windows machines is delete the old directory (C:\Python27\ because windows does seem to actually delete things) and when reinstalling specify a new directory (C:\Python279\ or whatever you choose to call it).

I am using Win 10 with Python 2.7.9.

CDS
  • 1
  • 1
0

Go to C:/Users/[your user]/AppData/Local/Programs/Python/Python35-32 and delete or rename every *.py file in this directory which is named after a certain method, function, module or library. Then run IDLE. Should work.

Hope I could help

Fish
  • 1
  • 1
0

My problem was that the .py file wasn't on my local machine. It was on a shared directory.

After moving the file to my local machine, I quit getting the error.

Eric
  • 65
  • 6
0

Just to note my particular issue, this happens for me when my RAM gets full and my CPU gets busy.

The problem is because of a network socket timeout on the IPC pipes between the RPC subprocess.
It's a poor design (insecure and prone to failure) that's commonly used for IPC instead of process pipes.

The fix is to clear out some RAM and CPU usage and wait a minute before trying again.
And for developers, the fix is to stop using sockets for IPC and use proper process pipes.

Yes, it's the same exact socket timeout issue you experience with your browser, though on modern browsers, the page just stops loading instead of displaying a timeout error screen.
(note this assumes the case of a good WAN connection, with a local timeout)

Tcll
  • 7,140
  • 1
  • 20
  • 23
  • Not sure if this should be made an answer, but another prior case I had a few years ago was a rootkit that broke my TCP/IP functionality which caused this issue to be permanent, where the fix was to reinstall Windows. – Tcll Jun 09 '19 at 14:54
0

This is a fresh install. It works with firewall disabled. As this was a fresh install any answer that deals with AppData does not apply. Nor does any answer dealing with deleting *.py files.

If you are using a third party firewall - uninstall it and use Windows firewall. The main offender here is Avast/AVG. If you really want to you can set such software to "ask" you for rule creation, AVG ignores these rules in this case and blocks what it thinks is an external "Tcp/Udp" (sic) public connection.

Using Process Explorer from SysInternals reveals the succesful connection between the two processes. AVG cannot seem to deal with "phone home" situation originating on the same host. The problem should be more widespread as many debuggers operate in the same way, so there may be some contribution to this problem by the IDLE developers.

Change your firewall provider.

mckenzm
  • 1,545
  • 1
  • 12
  • 19