[947]ImportError: [joblib] Attempting to do parallel computing without protecting

2021-03-04 11:52:16 浏览数 (1)

python报错ImportError: [joblib] Attempting to do parallel computing without protecting

错误:

ImportError: [joblib] Attempting to do parallel computing without protecting your import on a system that does not support forking. To use parallel-computing in a script, you must protect your main loop using “if __name__ == '__main__'”. Please see the joblib documentation on Parallel for more information

解决方案:

代码语言:javascript复制
if __name__=='__main__'://加入此行代码即可

0 人点赞