5

我正在使用并行 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,))
4

0 回答 0