File “/anaconda2/python2.7/multiprocessing/reduction.py”, line 157, in rebuild_handle
new_handle = recv_handle(conn)
File “/anaconda2/python2.7/multiprocessing/reduction.py”, line 83, in recv_handle
return _multiprocessing.recvfd(conn.fileno())
OSError: [Errno 4] Interrupted system call
图片截图:
文件路径:"/usr/lib/python2.7/multiprocessing/reduction.py"
第82行的函数recv_handle()以下代码
def recv_handle(conn):
return _multiprocessing.recvfd(conn.fileno())
修改为:
def recv_handle(conn):
while True:
try:
_fl_data = _multiprocessing.recvfd(conn.fileno())
break
except OSError, num:
print num
if num==4:
continue
return _fl_data
2.将python2更换为python3
可能由于权限或者其他原因而无法对源文件进行修改,这时可以使用python3运行项目,从而避免python2中自身存在的该问题的发生。(推荐、有效!!!)