Search code examples
pythonpy2exe

ImportError: No module named _multiprocessing


I programmed a python application (used wxPython; py2exe; python 2.6).

Now my code is using the multiprocessing module. It works! (IDE)

When I try to build this code I got no problems. But when I execute this built .exe file I got this error:

Traceback (most recent call last): File "myprogram.py", line 800, in multiprocessing.freeze_support() File "multiprocessing__init__.pyc", line 100, in freeze_support

File "multiprocessing\forking.pyc", line 153, in ImportError: No module named _multiprocessing

The _multiprocessing.pyd is available. I checked this.


Solution

  • I think you need to add the line freeze_support() after your main code.... Here is the main link to the docs multiprocessing freeze support

    Also these 2 questions mention the same thing stackoverflow ques and multiprocessing and pyqt

    Do tell if it works for you...........