Using EasyGui With Cx_Freeze

1.1k Views Asked by At

I've created this question relative to my other one - How to include modules in Cx_freeze, but decided that wasn't really realtive to my current question.

When i freeze my program, which uses easygui, I get a whole bunch of errors about missing modules, Yes - easygui is installed Python32, And Yes - Easygui is in site - packages,

Any Help would be appreciated, and FYI i'm using the basic setup.py ;)

from cx_Freeze import setup, Executable

setup(
        name = "GUIproject",
        version = "0.1",
        description = "Sample Test easygui",
        executables = [Executable("GUIproject.py")])

The modules it reports are missing include PIL, StringIO, Tkinter and tkFileDialog.

1

There are 1 best solutions below

15
On

It's probably fine - see this answer about why missing modules aren't a problem.

In this case, PIL is optional for Easygui, and the other 3 are Python 2 names. Easygui will import the Python 3 names instead (you're running Python 3.2) - something like this:

try:
    import tkinter  # Python 3
except ImportError:
    import Tkinter as tkinter  # Python 2

So you should get an output exe file anyway - try running it, and see if it works.