When I try to open IDLE, it says it's subprocess didn't make connection

When I open IDLE, it opens the window, but then shows a pop-up saying “IDLE’s subprocess didn’t make connection. Either IDLE can’t start a subprocess or personal firewall software is blocking the connection.” I tried restarting my computer (I’m running python on linux), but it still isn’t working.

https://docs.python.org/3/library/idle.html#startup-failure

What command are you giving to launch IDLE?

You might try:

python3 -m idlelib

and see if you get the same error.

I’m having the same issue as the OP when I double-click on the IDLE application in my application finder or try to open a file by right clicking it. However, I don’t have this issue when I open it with this command line instruction. Any suggestions on how to make it work with a normal “double-click” on the application?