Python subprocess call returns “command not found”, Terminal executes correctly

问题:

Python subprocess call returns “command not found”, Terminal executes correctly

具体为:/bin/sh 1 not found


解析:
出错的命令没有添加到环境变量路径(PATH)中。


解决:
打开配置文件,并将该命令的包路劲添加到最后
sudo gedit /etc/profile


立刻生效(这步对我无效,我重启后才生效的尴尬

source /etc/profile

猜你喜欢

转载自blog.csdn.net/jiangjiang_jian/article/details/80568256