Dhr*_*vil 0 python tcsh shebang
所以我试图创建一些我想运行的脚本,而不是每次运行时都手动指定解释器.
#!/usr/bin/python
Run Code Online (Sandbox Code Playgroud)
上面是现有脚本上的shebang,它运行得像我想要的那样.
下面是我从头开始编写的脚本的shebang
#!/usr/bin/python
Run Code Online (Sandbox Code Playgroud)
对我来说,他们看起来完全一样,但是运行第二个给了我一个
helloWorld.py: permission denied
Run Code Online (Sandbox Code Playgroud)
两者都是使用kate,utf-8和unix行创建的.两者都与我相同.
有任何想法吗?
shebang可能是正确的,但脚本也需要执行权限.
# Anyone can execute
chmod +x helloworld.py
# Only the file owner can execute
chmod u+x helloworld.py
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
155 次 |
| 最近记录: |