Python 2.7 on Windows, “assert main_name not in sys.modules, main_name” for all multiprocessing examples

后端 未结 1 459
别跟我提以往
别跟我提以往 2020-12-11 17:25

There is following simple code:

from multiprocessing import Process, freeze_support

def foo():
    print \'hello\'

if __name__ == \'__main__\':
    freeze_         


        
相关标签:
1条回答
  • 2020-12-11 18:14

    This is a known bug:

    http://bugs.python.org/issue10845

    Not sure if this will ever get ported to 2.7.X.

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