13

I am new to Python and cx_Freeze. Please help me to get it working.

And run the command:

python setup.py build

It is giving me the following error.

Missing modules:

? System imported from serial.serialcli

? TERMIOS imported from serial.serialposix

? clr imported from serial.serialcli

? wx imported from wxversion

I am using the following setup.py file.

# Let's start with some default (for me) imports...

from cx_Freeze import setup, Executable

# Process the includes, excludes and packages first

includes = []
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
        'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
        'Tkconstants', 'Tkinter']
packages = []
path = []

GUI2Exe_Target_1 = Executable(
    # what to build
    script = "..\esp\main.py",
    initScript = None,
    base = 'Win32GUI',
    targetDir = r"dist",
    targetName = "acup_new.exe",
    compress = True,
    copyDependentFiles = True,
    appendScriptToExe = False,
    appendScriptToLibrary = False,
    icon = None
    )

setup(

    version = "0.1",
    description = "No Description",
    author = "No Author",
    name = "cx_Freeze Sample File",

    options = {"build_exe": {"includes": includes,
                 "excludes": excludes,
                 "packages": packages,
                 "path": path
                 }
           },

    executables = [GUI2Exe_Target_1]
    )
Community
  • 1
  • 1
user977601
  • 503
  • 2
  • 7
  • 16

1 Answers1

1

Based on this question, it seems like you may need to add these modules to the includes[] list in your setup.py file.

I don't recall having to do this when using cx_Freeze, but I'll edit this answer once I can find more information.

Community
  • 1
  • 1
gary
  • 4,227
  • 3
  • 31
  • 58