1.linux,mac下通过在代码首行单独添加一行: #!/usr/bin/env python3 ,在命令行$执行 chmod a+x hello.py,添加权限,即可在命令行下执行 ./*.py
我想问下执行chmod a+x 文件名.py时老是出现No such file or directory是怎么回事呀?
同问
文件后缀名不对
文件存放路径是不是当前路径,不是的话要用相对路径
检查一下这个#!/usr/bin/env python3路径有没有写对. 我就是把usr写成了user 报错的.
Sign in to make a reply
东梓_Z
1.linux,mac下通过在代码首行单独添加一行: #!/usr/bin/env python3 ,在命令行$执行 chmod a+x hello.py,添加权限,即可在命令行下执行 ./*.py