A
A
Artyom2018-04-24 21:01:21
Python
Artyom, 2018-04-24 21:01:21

Compiling a .py file with tkinter via cx_Freeze: what's wrong?

Made a program with tkinter. Tried to use cx_freeze for compilation. setup.exe-

import sys
from cx_Freeze import setup, Executable

build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]}

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

setup(name = "English Teacher",
    version = "1.0",
    description = "My application!",
    options = {"build_exe": build_exe_options},
    executables = [Executable("main.pyw", base = base)])

When I run the resulting exe, I get: "ModuleNotFoundError: no module named tkinter".
What should I try to do to fix the error?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question