我是 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.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)