macos 没有空闲子进程连接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3277946/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
No IDLE Subprocess connection
提问by Ian
I'm new to python programming, and want to try to edit scripts in IDLE instead of the OSX command line. However, when I try to start it, it gives me the error "Idle Subprocess didn't make a connection. Either Idle can't start a subprocess or personal firewall software is blocking the connection." I don't have a firewall configured, so what could the problem be?
我是 python 编程的新手,想尝试在 IDLE 而不是 OSX 命令行中编辑脚本。但是,当我尝试启动它时,它给了我错误“空闲子进程没有建立连接。空闲无法启动子进程或个人防火墙软件正在阻止连接。” 我没有配置防火墙,那么问题是什么?
回答by ars
You can try running IDLE with the "-n" option. From the IDLE help:
您可以尝试使用“-n”选项运行 IDLE。从空闲帮助:
Running without a subprocess: If IDLE is started with the -n command line switch it will run in a single process and will not create the subprocess which runs the RPC Python execution server. This can be useful if Python cannot create the subprocess or the RPC socket interface on your platform. However, in this mode user code is not isolated from IDLE itself. Also, the environment is not restarted when Run/Run Module (F5) is selected. If your code has been modified, you must reload() the affected modules and re-import any specific items (e.g. from foo import baz) if the changes are to take effect. For these reasons, it is preferable to run IDLE with the default subprocess if at all possible.
回答by Ned Deily
You don't say which version of Python or OS X you are using but, if you are trying to use the IDLE installed by the recent python.org 64-bit installer for Python 2.7, you are almost certainly running into a known issue. As noted in the bug report, until the problem with the 2.7 installer is resolved, the simplest workaround for 2.7 is to install the 32-bit-only version of 2.7 using the '10.3 and up' installer.
您没有说明您使用的是哪个版本的 Python 或 OS X,但是,如果您尝试使用由 Python 2.7 最近的 python.org 64 位安装程序安装的 IDLE,您几乎肯定会遇到一个已知问题。正如错误报告中所述,在 2.7 安装程序的问题得到解决之前,2.7 的最简单解决方法是使用“10.3 及更高版本”安装程序安装 32 位版本的 2.7 。
UPDATE: This problem existed with the python.org 64-bit/32-bit installer for Python 2.7. It has been corrected with subsequent releases of Python 2.7; as of this writing, Python 2.7.2 is current. However, the root cause of the original problem remains the version of Tcl/Tk 8.5
supplied by Apple with Mac OS X 10.6. To use IDLE or Tkinter with the current 64-bit Python installers for OS X, you need to install the more stable Tcl/Tk 8.5
from ActiveState. Updated details are maintained herewhich is also linked from the current installer download pages.
更新:Python 2.7 的 python.org 64 位/32 位安装程序存在此问题。它已在 Python 2.7 的后续版本中得到纠正;在撰写本文时,Python 2.7.2 是最新的。但是,原始问题的根本原因仍然是Tcl/Tk 8.5
Apple 随 Mac OS X 10.6 提供的版本。要将 IDLE 或 Tkinter 与 OS X 的当前 64 位 Python 安装程序一起使用,您需要Tcl/Tk 8.5
从 ActiveState安装更稳定的。此处维护更新的详细信息,也可从当前安装程序下载页面链接。