Question

I can use Fabric fine to run commands on the server.

This command is not working however

run(u'ipython profile create myprofile')

it returns this error

Warning: run() received nonzero return code 127 while executing 'ipython profile create myprofile'!

Am I doing something wrong. Thanx.

Was it helpful?

Solution

This is because fabric couldn't find the ipython command. If a command is not found 127 is returned from OS.

I believe you dont have ipython installed or its not installed in the $PATH that is set for fabric. If you are using virtual environment I suggest you use the absolute path for both python and ipython. Something like

run('/virtual-env/bin/python /virtual-env/bin/ipython profile create myprofile')

You can check which paths are in use by run('echo $PATH')

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top