marcelotduarte / cx_Freeze

cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any platform that Python itself works on.
https://marcelotduarte.github.io/cx_Freeze/
Other
1.37k stars 220 forks source link

Child threads are not running in exe file. #679

Closed khannoaman closed 4 years ago

khannoaman commented 4 years ago

My program include child threads but when i am converting it into exe using cx_freeze only the main thread is running but child threads are not running . please help.

Here is the setup.py file

import sys from cx_Freeze import setup, Executable

build_exe_options = {"packages": ["os"]}

base = None if sys.platform == "win32": base = "Win32GUI"

setup( name = "Covid-19 voice assistant system", version = "0.1", description = "A voice assistant system!", options = {"build_exe": build_exe_options}, executables = [Executable("Main.py", base=base)])

marcelotduarte commented 4 years ago

OS: Windows? cx-freeze version? Threads: Can you show a snippet or sample? It's building with "python setup.py build" but doesn't run?

khannoaman commented 4 years ago

There was a problem in installing modules, the build was not installing few modules like "speech_recognition","pyttsx3","pyaudio" so I solved it by explicitly coping the modules in lib directory and it worked for me . Thanks for your quick response . I really appreciate that you're here to help those in need.

marcelotduarte commented 4 years ago

Maybe you can add the modules and packages in includes and packages options, like: build_exe_options = {"packages": ["os", "pyaudio"]}

khannoaman commented 4 years ago

Okay thank you I'll try it.

marcelotduarte commented 4 years ago

Please close the issue if it's resolved.