我是 python 编程的新手,想尝试在 IDLE 而不是 OSX 命令行中编辑脚本。但是,当我尝试启动它时,出现错误“空闲子进程未建立连接。空闲无法启动子进程或个人防火墙软件正在阻止连接。”我没有配置防火墙,那可能是什么问题?
最佳答案
您可以尝试使用“-n”选项运行 IDLE。来自 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.
关于python - 无 IDLE 子进程连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3277946/