py2exe with multiprocessing fails to run the processes py2exe with multiprocessing fails to run the processes windows windows

py2exe with multiprocessing fails to run the processes


You need a call to multiprocessing.freeze_support() when packaging a Python script into an executable for use on Windows. This call should come just after if __name__ == '__main__': before actually calling main()


You know you are using a app of year 2008? (py2exe), python is in constant actualizations, and then gives problems with py2exe, I can give you a better solution...

You can use cxfreeze: http://cx-freeze.sourceforge.net/

Simply, easy, good, and actualized.

I hope this helped you.


Here is a great link that explains how to freeze your multiprocessing program to make it work with py2exe:

Namely, you will need to call multiprocessing.freeze_support() right after your call to main:

import multiprocessingif __name__ == '__main__':    multiprocessing.freeze_support()