Shebang doesn't work with python3

后端 未结 4 1715
执笔经年
执笔经年 2020-12-25 10:54

I have the following program:

#!/usr/local/bin/python3

print(\"Hello\")

Via terminal I do test.py and I get:

         


        
4条回答
  •  無奈伤痛
    2020-12-25 11:31

    Windows end line was my problem too. Writing the same program with a linux editor like VI solved it for me. Also, using "less" command , i was able to see the windows end line characters

提交回复
热议问题