5

私は cx_Freeze スクリプトに何かを含める際にこの問題を抱えていました。私がやろうとしているのは、私のプログラムで使用しているため、easygui と sys を含めることです。どんな助けでも大歓迎です!

コードは次のとおりです。

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 = "ProgramGUI",
        version = "0.1",
        description = "My GUI application!",
        options = {"build_exe": build_exe_options},
        executables = [Executable("ProgramGUI.py", base=base)])

本当に私が知る必要があるのは、Includes[ "sys", "easyGUI" ] をセットアップスクリプトに組み込む方法です:D

4

1 に答える 1

4

真剣に、cx_freeze に easy_gui をインポートするように指示する小さなことを見逃していると思います。

import sys
from cx_Freeze import setup, Executable


build_exe_options = {
    "packages": ["os", "sys"], 
    "excludes": ["tkinter"],
    "includes": ["easy_gui"] # <-- Include easy_gui
}

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

setup(  name = "ProgramGUI",
        version = "0.1",
        description = "My GUI application!",
        options = {"build_exe": build_exe_options},
        executables = [Executable("ProgramGUI.py", base=base)])
于 2016-07-14T09:54:12.510 に答える