>>> help(raw_input)
Help on built-in function raw_input in module __builtin__:
raw_input(...)
raw_input([prompt]) -> string
Read a string from standard input. The trailing newline is stripped.
If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError.
On Unix, GNU readline is used if enabled. The prompt string, if given,
is printed without a trailing newline before reading.
怎么了?你在键盘上键入什么?
编辑(此处为报告评论):
我的猜测是,您在使用py2exe时使用了“windows”参数,这意味着没有打开控制台-没有控制台,就没有可供原始输入使用的stdin。相反,您可以在setup.py中使用“console”参数,您的exe将打开一个控制台窗口,允许原始输入工作