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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -