Skip to content

codex-console-windows-x64.exe: error: unrecognized arguments: --multiprocessing-fork 错误 #26

@saberhom

Description

@saberhom

codex-console-windows-x64.exe: error: unrecognized arguments: --multiprocessing-fork parent_pid=9496 pipe_handle=868

pyinstaller 打包含有多进程代码的程序问题
在windows上Pyinstaller打包多进程程序需要添加特殊指令。 这里是官方github给出的解释: https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing

修改方式比较简单,在if name=='main:'下添加一句multiprocessing.freeze_support()即可。

if name == 'main':
# pyinstaller 打包含有多进程代码的程序问题,加入下面一行代码,解决
multiprocessing.freeze_support()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions