linux - Python subprocess throws [Errno 2] No such file or directory, error generated only when it on a remote host -


i'm running python 2.6. i'm getting subprocess throws [errno 2] no such file or directory when run script via ssh.

for example, if run script manually on machine, there no errors, if ssh hostname script.py --host hostname generates error , tells me file "/usr/lib64/python2.6/subprocess.py missing, that's not true both servers have file.

i've written subprocess call this:

p4 = subprocess.popen(command, stdout=subprocess.pipe, stderr=subprocess.pipe, shell=true) 

the command contains list.

any ideas why works locally, not remotely?

the solution have command set absolute path, example, instead of mke2fs, needed /sbin/mke2fs.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -