我正在使用并行python使用名为OrcFxAPI的模块运行多个动态模拟。如果它在我的机器上作为python程序运行,该程序可以正常工作,但如果我使用py2exe将其转换为exe文件然后运行,我会收到以下错误:
Traceback (most recent call last):
File "Analysis.pyc", Line 500, in multiprocessor
File "pp.pyc", Line 342, in __init__
File "pp.pyc", Line 506, in set_ncpus
File "pp.pyc", Line 140, in __init__
File "pp.pyc", Line 152, in start
File "pptransport.pyc", Line 140, in receive
RuntimeError: Communication pipe read error
我的计划中的这一行失败了:
job_server = pp.Server(ppservers=ppservers)
但我认为这可能与提交作业时导入OrcFxAPI模块的路径有关:
job = job_server.submit(max_seastate, (gui_vars, case_list, case, line_info, output_vars), (), ("OrcFxAPI",), callback=finished, callbackargs=(case_no, no_of_cases,))