我是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.