错误解决方案:SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(…)?


现象

执行 play 命令后,报一下错误:

 % play
  File "/Users/tanggaowei/sdk/play-1.6.1/play", line 50
    print r"~        _            _ "
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

解决方案

修改 /Users/tanggaowei/sdk/play-1.6.1/play 文件,将首行修改为:

#!/usr/bin/env python2

强制使用 python2。


前一篇:

发表评论