Closed Passionate-coder997 closed 4 years ago
Maybe
import sys
from cx_freeze import setup,Executable
base=None
if sys.platform=="win32"
base="win32GUI"
executables=[Executable("stopwatch.py", icon="icon3.ico", base=base)]
setup(name="Stopwatch"
options={"build_exe":{"packages":["pyttsx3"], "excludes":["tkinter"]}}
version="1.0"
discription="Something"
executables=executables)
cx_Freeze 6.3 has just been released. Assuming this has been resolved. If you had issues please re-open.
I am making a stopwatch in python and to convert my .py file to .exe I had made a setup.py file with this code:
import sys from cx_freeze import setup,Executable build_exe_options={"packages":["datetime","os","pyttsx3"] "excludes":"tkinter"} base=None if sys.platform=="win32" base="win32GUI" executables=[Executable("stopwatch.py", icon="icon3.ico", base=base)] setup(name="Stopwatch" options={"build.exe":{"packages":["tkinter"], "include files":["icon3.ico"]}} version="1.0" discription="Something" executables=executables)
when I compiled this code it is building the executable but when I run it then it says NoModuleNamed:"pyttsx3" so how I can solve this error