我有一个像gorsel.py
这样的python脚本。我想通过setup.py
将其转换为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 = "sifreleme",
version = "0.1",
description = "My GUI application!",
options = {"build_exe": build_exe_options},
executables = [Executable("gorsel.py", base=base)])
try:
import tkinter except ImportError:
import Tkinter as tkinter`
如何修复我的setup.py
脚本?谢谢
答案 0 :(得分:1)
将此添加到build_exe_options:"icon": "path/to/icon.ico"