我在我的 Mac 上使用最新的 Python Launcher 运行 Python3,脚本在 Mac 终端上运行。它是一个聊天机器人脚本,类似于 Python 版本的 Eliza 仿冒品。这是我从 Mac 终端得到的。无法运行它,我使用 input() 而不是 raw_input() 因为这是 Python3。
Desktop/doctor.py' && echo Exit status: $? && exit 1
Hello. How are you feeling today?
> I am fine.
Traceback (most recent call last):
File "/Users/Gary/Desktop/doctor.py", line 256, in <module>
main()
File "/Users/Gary/Desktop/doctor.py", line 248, in main
statement = input("> ")
File "<string>", line 1
I am fine.
^
SyntaxError: invalid syntax
但是,当我在 repl.it 上运行它时,它运行良好。我想知道我的mac出了什么问题..谢谢大家