Why python executable opens new window instance when function by multiprocessing module is called on windows

前端 未结 1 433
礼貌的吻别
礼貌的吻别 2020-12-01 22:20

Short Question: Why python executable generated by pyinstaller opens new window instance when function by multiprocessing module is called on windows operating system

相关标签:
1条回答
  • 2020-12-01 23:23

    If you want to use multiprocessing as a frozen executable, you need to call multiprocessing.freeze_support() at the beginning of your main script. This will allow multiprocessing to "take over" when it spawns its worker processes.

    See also https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing

    0 讨论(0)
提交回复
热议问题