文件头上加 #!/usr/bin/env pythonchmod +x file.py./file.py
chmod a+x name.py
极有可能是你的权限需要加强,特别是要管理员的权限。
chmod +x filename