cx_Freeze
编译我的 pygame 程序时,出现了一个 keyerror KeyError: 'TCL_Library'
。我为什么会遇到这个问题,如何解决?下面是我的 setup.py:
from cx_Freeze import setup, Executable
setup(
name = "Snakes and Ladders",
version = "0.9",
author = "Adam",
author_email = "Omitted",
options = {"build_exe": {"packages":["pygame"],
"include_files": ["main.py", "squares.py",
"pictures/Base Dice.png", "pictures/Dice 1.png",
"pictures/Dice 2.png", "pictures/Dice 3.png",
"pictures/Dice 4.png", "pictures/Dice 5.png",
"pictures/Dice 6.png"]}},
executables = [Executable("run.py")],
)
tk86.dll
和tcl86.dll
复制到二进制路径可以解决运行时错误。 - PaleNeutron