- Add
import sys
as the new topline
- You misspelled "executables" on the last line.
- Remove
script =
on last line.
The code should now look like:
import sys
from cx_Freeze import setup, Executable
setup(
name = "On Dijkstra's Algorithm",
version = "3.1",
description = "A Dijkstra's Algorithm help tool.",
executables = [Executable("Main.py", base = "Win32GUI")])
Use the command prompt (cmd
) to run python setup.py build
. (Run this command from the folder containing setup.py
.) Notice the build
parameter we added at the end of the script call.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…