Python错误—IDLE的子进程没有连接。空闲不能启动或个人防火墙软件阻塞连接。

时间:2021-12-27 07:12:10

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

我是编程新手,我决定先学习Python,所以;

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.".

我安装了Python,最新版本3.4。我正在尝试打开Python IDLE(GUI)模式,所以当我打开时,我得到消息“IDLE的子进程没有连接。”空闲不能启动或个人防火墙软件阻塞连接。

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!

我的防火墙不是问题,因为我把它放到了Python里。我也试着重新安装它,但它没有产生任何影响。所以,如果有人能帮忙,请帮忙!

Thank you on your time :D

谢谢您的时间:D。

8 个解决方案

#1


9  

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

删除所有用Python创建的.py文件。例如随机的。py,结束。py -这是我的问题,导致了相同的通知窗口。

#2


3  

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)

在当前目录中,有一个与Python同名的文件(引用:不能从资源管理器[2013]中运行Python,而空闲的子进程没有连接),这可能是一个常见的问题。

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)

如果您有不正确的环境变量,如主页USERPROFILE(引用:问题14576:IDLE:不一致地使用HOMEDRIVE、主页和用户配置文件),似乎也会发生这种情况。

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

我找到了另一个相关的问题:Python空闲子过程错误?

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

如果答案不在那里,我的建议是:谷歌可能是你的朋友!上面的3个线索来自:-)

#3


1  

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).

只是有同样的问题。所以卸载和重新安装修复了它,花了10分钟。Windows机器的关键是删除旧的目录(C:\Python27\因为Windows确实删除了一些东西),当重新安装时指定一个新的目录(C:\Python279\或任何你选择调用它的东西)。

I am using Win 10 with Python 2.7.9.

我使用的是Python 2.7.9的Win 10。

#4


1  

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

我修复了它,我需要用管理权限运行空闲。(我使用的是Windows 7 x64)。希望这个有帮助。

#5


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.

我在一个名为“test”的文件中遇到了类似的问题。py“和Python 2.7.9——将文件重命名为其他问题解决了我的问题。检查之后,我注意到在Python27\Lib文件夹下有一个同名的文件。

Seems to be a bug in IDLE.

似乎是一个闲置的bug。

#6


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.

转到C:/用户/[你的用户]/AppData/本地/程序/Python/Python35-32,并删除或重命名每个*。这个目录下的py文件是以特定的方法、函数、模块或库命名的。然后空转。应该工作。

Hope I could help

希望我可以帮助

#7


0  

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

简单的…重命名您的.py文件,它的名称与任何关键字名称(如“random”)不同。py'已经存在于python包中。

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.

如。我将其中一个文件命名为“random.py”。同样的错误出现了。我把它重新命名为“random_demo.py”。它工作。不同的命名会丢弃已经存在的文件和同名的新创建的文件之间的模糊问题。

#8


0  

The fix is here .

解决办法就在这里。

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

打开任务管理器,杀死pythonw。exe,如果你找到2个实例或者更多。应该工作了。

#1


9  

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

删除所有用Python创建的.py文件。例如随机的。py,结束。py -这是我的问题,导致了相同的通知窗口。

#2


3  

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)

在当前目录中,有一个与Python同名的文件(引用:不能从资源管理器[2013]中运行Python,而空闲的子进程没有连接),这可能是一个常见的问题。

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)

如果您有不正确的环境变量,如主页USERPROFILE(引用:问题14576:IDLE:不一致地使用HOMEDRIVE、主页和用户配置文件),似乎也会发生这种情况。

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

我找到了另一个相关的问题:Python空闲子过程错误?

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

如果答案不在那里,我的建议是:谷歌可能是你的朋友!上面的3个线索来自:-)

#3


1  

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).

只是有同样的问题。所以卸载和重新安装修复了它,花了10分钟。Windows机器的关键是删除旧的目录(C:\Python27\因为Windows确实删除了一些东西),当重新安装时指定一个新的目录(C:\Python279\或任何你选择调用它的东西)。

I am using Win 10 with Python 2.7.9.

我使用的是Python 2.7.9的Win 10。

#4


1  

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

我修复了它,我需要用管理权限运行空闲。(我使用的是Windows 7 x64)。希望这个有帮助。

#5


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.

我在一个名为“test”的文件中遇到了类似的问题。py“和Python 2.7.9——将文件重命名为其他问题解决了我的问题。检查之后,我注意到在Python27\Lib文件夹下有一个同名的文件。

Seems to be a bug in IDLE.

似乎是一个闲置的bug。

#6


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.

转到C:/用户/[你的用户]/AppData/本地/程序/Python/Python35-32,并删除或重命名每个*。这个目录下的py文件是以特定的方法、函数、模块或库命名的。然后空转。应该工作。

Hope I could help

希望我可以帮助

#7


0  

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

简单的…重命名您的.py文件,它的名称与任何关键字名称(如“random”)不同。py'已经存在于python包中。

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.

如。我将其中一个文件命名为“random.py”。同样的错误出现了。我把它重新命名为“random_demo.py”。它工作。不同的命名会丢弃已经存在的文件和同名的新创建的文件之间的模糊问题。

#8


0  

The fix is here .

解决办法就在这里。

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

打开任务管理器,杀死pythonw。exe,如果你找到2个实例或者更多。应该工作了。