Discuss / Python / Mac系统安装了python3.7,用终端读取.py文件时一直报错

Mac系统安装了python3.7,用终端读取.py文件时一直报错

Topic source

机智豆_RD

#1 Created at ... [Delete] [Delete and Lock User]

小白求大神指导

(base) mingyingli:Documents rendan$ cd /Users/rendan/Documents/

(base) mingyingli:Documents rendan$ python3 abc.py

  File "abc.py", line 1

    >>> print('hello')

     ^

SyntaxError: invalid syntax

把你abc.py 里面的>>> 删了


  • 1

Reply