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')