我试图从Golang执行一个python脚本(用于访问远程机器和运行命令),它会出现“退出状态2”错误
out, err := exec.Command("/usr/local/opt/bin/python3.7", "/users/test.py -i 12.13.14.15 --cmd \"uptime && date\"").Output()
if err != nil {
fmt.Printf("%s", err)
} else {
fmt.Println("Command Successfully Executed")
output := string(out[:])
fmt.Println(output)
}
Output
exit status 2
thank you.