1
jmc891205 2018 年 4 月 2 日
|
2
willxiang 2018 年 4 月 2 日
|
3
lukeshawn OP @jmc891205 你好,我在命令行模式下输入了你的 2 种方法,方法一没变,方法二显示:-bash: u+x: command not found ;
然后我试着在 python 交互模式下输入这个,显示 SyntaxError: invalid syntax |
4
araraloren 2018 年 4 月 2 日
Maybe your python script missing the executable permission.
|
5
lukeshawn OP @araraloren how to figure it out
|
6
yxy2829 2018 年 4 月 2 日
加 sudo
|
7
mssora 2018 年 4 月 2 日
@lukeshawn #1 的命令都是在 shell 里面运行的,还有如果要直接运行需要在脚本第一行指定解释器:#!/usr/bin/env python
|
9
yianing 2018 年 4 月 2 日
新人先用 IDE 吧,一键运行,还有提示。
|